To specialize, override readMsg, sendMsg, msgNonNull, and
msgIsNull.
|
|
__init__(host,
port,
async=True)
x.__init__(...) initializes x; see help(type(x)) for signature |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
stop(self)
If async, stops the reader thread. |
source code
|
|
|
|
done(self)
Returns True if the socket is closed and rq is empty. |
source code
|
|
|
|
readBlock(self,
count)
Returns a block of count bytes as a string, or raises qubsock.Stop,
or any relevant socket.error from select or recv. |
source code
|
|
|
|
readLine(self,
terminator='\n')
Returns the next line as a string, including the trailing terminator,
or raises qubsock.Stop, or any relevant socket.error from select or
recv. |
source code
|
|
|
|
sendBlock(self,
block)
Sends block as a string of bytes; returns True on success, False if
the socket closed. |
source code
|
|
|
|
msgNonNull(self)
Override this method to return a (simple) non-null message (for use
as place-holder). |
source code
|
|
|
|
msgIsNull(self,
msg)
Override this method to return whether a message is null. |
source code
|
|
|
|
sendMsg(self,
msg)
Override this method to send a message out self.sock. |
source code
|
|
|
|
readMsg(self)
Override this method to read a structured message using readBlock and
return it. |
source code
|
|
|
Inherited from object:
__delattr__,
__format__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__,
__sizeof__,
__str__,
__subclasshook__
|