Package pyxmpp2 :: Package test :: Module _util :: Class NetReaderWritter
[hide private]

Class NetReaderWritter


Threaded network reader/writter.
Instance Methods [hide private]
 
__init__(self, sock, need_accept=False)
x.__init__(...) initializes x; see help(type(x)) for signature
 
start(self)
Start the reader and writter threads.
 
_do_tls_handshake(self)
Do the TLS handshake.
 
starttls(self, *args, **kwargs)
Request switching to TLS.
 
writter_run(self)
The writter thread function.
 
reader_run(self)
The reader thread function.
 
write(self, data)
Queue data for write.
 
disconnect(self)
Request disconnection.
 
read(self)
Read data from input buffer (received by the reader thread).
 
close(self)
Close the socket and request the threads to stop.
 
wait(self, timeout)
Wait for socket closing, an error or timeout seconds.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Instance Variables [hide private]
  eof
EOF flag
  error
error flag
  peer
address of the peer connected
  rdata
data received
  sock
the socket
  wdata
data to be sent
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, sock, need_accept=False)
(Constructor)

 
x.__init__(...) initializes x; see help(type(x)) for signature
Overrides: object.__init__
(inherited documentation)

_do_tls_handshake(self)

 
Do the TLS handshake. Called from the reader thread after starttls is called.

starttls(self, *args, **kwargs)

 

Request switching to TLS.

First waits untill all currently buffered data is sent.

Parameters: