Package driver :: Module network :: Class Connection
[show private | hide private]
[frames | no frames]

Class Connection


The connection object handles dealing with the user on a socket level. Here we write data to the user and handle data the user has sent us.
Method Summary
  __init__(self, newengine, newsock, newaddr)
  __repr__(self)
  __str__(self)
  close(self)
Shuts down the socket for the Connection ob.
Socket getSocket(self)
Returns the socket for this connection.
  handleNetworkData(self, new_data)
Handles incoming network data.
  write(self, data)
Writes data to the socket.

Method Details

close(self)

Shuts down the socket for the Connection ob.

getSocket(self)

Returns the socket for this connection.
Returns:
the socket for this connection
           (type=Socket)

handleNetworkData(self, new_data)

Handles incoming network data. It'll buffer it and read it until we hit a carriage return at which point we'll handle the line as a whole.
Parameters:
new_data - the new data they just typed at us
           (type=string)

write(self, data)

Writes data to the socket.
Parameters:
data - the data to write to the user

Generated by Epydoc 2.0 on Wed Jan 21 21:00:06 2004 http://epydoc.sf.net