This is an abstract class, you must derive from this class and add
these methods:
onConnect() - called when a connection has been established
onClose() - called when the connection has been lost
onXML(doc) - called when an xml document has arrived
(doc is an xml.dom.minidom)
It may be useful to override the error method.
The initialization method accepts two parameters: host, and port.
It will attempt to make a socket connection to the specified host,
on the specified port. Pretty obvious behavior.
Methods
|
|
__init__
collect_incoming_data
error
found_terminator
handle_close
handle_connect
log
push
pushXML
|
|
__init__
|
__init__ (
self,
host,
port,
)
|
|
collect_incoming_data
|
collect_incoming_data ( self, data )
|
|
error
|
error ( self, error="error" )
called whenever there are problems parsing xml from the server,
shouldn't really happen often, if ever... unless your server is broken
|
|
found_terminator
|
found_terminator ( self )
|
|
handle_close
|
handle_close ( self )
call when you want to close the connection
|
|
handle_connect
|
handle_connect ( self )
|
|
log
|
log ( self, *ignore )
|
|
push
|
push ( self, data )
|
|
pushXML
|
pushXML ( self, doc )
pushes an xml document to the client
|
|