Emulation of a socket object
Methods
|
|
|
|
__init__
|
__init__ ( self, system )
|
|
_checkConnected
|
_checkConnected ( self )
Exceptions
|
|
self.system.error( errno.ECONNRESET, 'Connection reset by peer' )
self.system.error( errno.ENOTCONN, 'Socket is not connected' )
|
|
|
_checkOpen
|
_checkOpen ( self )
Exceptions
|
|
self.system.error( errno.EBADF, 'Bad file descriptor' )
|
|
|
_connected
|
_connected ( self, other )
|
|
_enqueue
|
_enqueue ( self, incoming )
|
|
_invalid
|
_invalid ( self )
Exceptions
|
|
self.system.error( errno.EINVAL, "Invalid argument" )
|
|
|
_recv
|
_recv ( self, data )
|
|
_wouldblock
|
_wouldblock ( self )
Exceptions
|
|
WouldBlock( "Blocking operation invoked", self )
self.system.error( errno.EWOULDBLOCK, 'Resource temporarily unavailable' )
|
|
|
accept
|
accept ( self )
|
|
bind
|
bind ( self, addr )
|
|
close
|
close ( self )
|
|
connect
|
connect ( self, addr )
Exceptions
|
|
self.system.error( errno.ECONNREFUSED, "Connection refused" )
|
|
|
connect_ex
|
connect_ex ( self, addr )
|
|
fileno
|
fileno ( self )
|
|
getpeername
|
getpeername ( self )
Exceptions
|
|
self.system.error( errno.ENOTCONN, 'Transport endpoint is not connected' )
|
|
|
getsockname
|
getsockname ( self )
|
|
listen
|
listen ( self, backlog )
|
|
readable
|
readable ( self )
|
|
recv
|
recv (
self,
bufsize,
flags=0,
)
Exceptions
|
|
NotImplementedError( "No receive flags allowed", self, flags )
|
|
|
send
|
send (
self,
data,
flags=0,
)
Exceptions
|
|
NotImplementedError( "No send flags allowed", self, flags )
|
|
|
sendall
|
sendall (
self,
data,
flags=0,
)
|
|
setblocking
|
setblocking ( self, blocking )
|
|
writable
|
writable ( self )
|
|