Table of Contents

Class: MocketType ./src/peak/util/mockets.py

Emulation of a socket object

Methods   
__init__
_checkConnected
_checkOpen
_connected
_enqueue
_invalid
_recv
_wouldblock
accept
bind
close
connect
connect_ex
fileno
getpeername
getsockname
listen
readable
recv
send
sendall
setblocking
writable
  __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 )


Table of Contents

This document was automatically generated on Mon Nov 11 01:11:04 2024 by HappyDoc version 2.1