Table of Contents

Class: swocket_client swocket/client.py

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 onData(data) - called when the entire data packet has arrived (there is no trailing null terminator)

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.

Base Classes   
asynchat.async_chat
Methods   
__init__
collect_incoming_data
found_terminator
handle_close
handle_connect
log
push
  __init__ 
__init__ (
        self,
        host,
        port,
        )

  collect_incoming_data 
collect_incoming_data ( self,  data )

  found_terminator 
found_terminator ( self )

  handle_close 
handle_close ( self )

call when you want to close the connection

Exceptions   
asyncore.ExitNow
  handle_connect 
handle_connect ( self )

  log 
log ( self,  *ignore )

  push 
push ( self,  data )

pushes a data packet to the server, null termination is automatic


Table of Contents

This document was automatically generated on Wed Jul 11 15:13:59 2001 by HappyDoc version r1_5