A collection of socket objects that can connect to each other
This object is effectively the "universe" of sockets and addresses, and
provides replacements for select.select and socket.socket .
Methods
|
|
__init__
fixupAddress
select
sleep
socket
|
|
__init__
|
__init__ ( self )
|
|
fixupAddress
|
fixupAddress ( self, addr )
Override in subclasses to validate addresses for bind and connect
|
|
select
|
select (
self,
iwtd,
owtd,
ewtd,
timeout=-1,
)
Exceptions
|
|
WouldBlock( "Blocking select()", iwtd, owtd, timeout )
self.error( errno.EBADF, 'Bad file descriptor' )
|
|
|
sleep
|
sleep ( self, secs )
Override in subclasses to implement/trap select() delays
|
|
socket
|
socket (
self,
family,
type,
proto=0,
)
Return a mock socket, ala socket.socket
Exceptions
|
|
NotImplementedError("Unsupported mocket type:", ( family, type, proto ) )
|
|
|