interface documentation

class _IInputOutputSystem(Interface): (source)

Known implementations: twisted.pair.testing.MemoryIOSystem

View In Hierarchy

An interface for performing some basic kinds of I/O (particularly that I/O which might be useful for twisted.pair.tuntap-using code).

Method close No summary
Method ioctl No summary
Method open No summary
Method read No summary
Method receiveUDP Return a socket which can be used to receive datagrams sent to the given address.
Method sendUDP Send a datagram to a certain address.
Method write No summary
Attribute O_CLOEXEC No summary
Attribute O_NONBLOCK No summary
Attribute O_RDWR No summary
def close(fd): (source)
See Also
os.close
def ioctl(fd, opt, arg=None, mutate_flag=None): (source)
See Also
fcntl.ioctl
def open(filename, flag, mode=511): (source)
See Also
os.open
def read(fd, limit): (source)
See Also
os.read
def receiveUDP(fileno, host, port): (source)

Return a socket which can be used to receive datagrams sent to the given address.

Parameters
fileno:intA file descriptor representing a tunnel device which the datagram was either sent via or will be received via.
host:bytesThe IPv4 address at which the datagram will be received.
port:intThe UDP port number at which the datagram will be received.
Returns
A socket.socket which can be used to receive the specified datagram.
def sendUDP(datagram, address): (source)

Send a datagram to a certain address.

Parameters
datagram:bytesThe payload of a UDP datagram to send.
address:tuple of (bytes, int)The destination to which to send the datagram.
Returns
tuple of (bytes, int)The local address from which the datagram was sent.
def write(fd, data): (source)
See Also
os.write