Package tlslite :: Module bufferedsocket :: Class BufferedSocket
[hide private]
[frames] | no frames]

type BufferedSocket

source code


Socket that will buffer reads and writes to a real socket object

When buffer_writes is enabled, writes won't be passed to the real socket until flush() is called.

Not multithread safe.

Instance Methods [hide private]
 
__init__(self, socket)
Associate socket with the object
source code
 
close(self)
Close the underlying socket.
source code
 
flush(self)
Send all buffered data
source code
 
getpeername(self)
Return the remote address to which the socket is connected
source code
 
getsockname(self)
Return the socket's own address (socket emulation).
source code
 
gettimeout(self)
Return the timeout associated with socket operations
source code
 
recv(self, bufsize)
Receive data from socket (socket emulation)
source code
 
send(self, data)
Send data to the socket
source code
 
sendall(self, data)
Send data to the socket
source code
 
setsockopt(self, level, optname, value)
Set the value of the given socket option (socket emulation).
source code
 
settimeout(self, value)
Set a timeout on blocking socket operations (socket emulation).
source code
 
shutdown(self, how)
Shutdown the underlying socket.
source code
Instance Variables [hide private]
boolean buffer_writes
whether to buffer data writes, False by default
Method Details [hide private]

__init__(self, socket)
(Constructor)

source code 

Associate socket with the object

Overrides: object.__init__

getpeername(self)

source code 

Return the remote address to which the socket is connected

(socket emulation)

gettimeout(self)

source code 

Return the timeout associated with socket operations

(socket emulation)