class documentation

class StringUDPSocket:

Constructor: StringUDPSocket(retvals)

View In Hierarchy

A fake UDP socket object, which returns a fixed sequence of strings and/or socket errors. Useful for testing.

Method __init__ Undocumented
Method connect Undocumented
Method recvfrom Return (or raise) the next value from self.retvals.
Instance Variable connectedAddr The address the socket is connected to.
Instance Variable retvals A list containing either strings or socket.errors.
def __init__(self, retvals: list[bytes | socket.error]):

Undocumented

def connect(self, addr: object):

Undocumented

def recvfrom(self, size: int) -> tuple[bytes, None]:

Return (or raise) the next value from self.retvals.

connectedAddr: object | None =

The address the socket is connected to.

retvals =

A list containing either strings or socket.errors.