Package CyberRail :: Package common :: Module httpclient :: Class Connection
[hide private]
[frames] | no frames]

Class Connection

source code


A connection to a server. You shouldn't use this class directly.

This class is mainly a storage class for connections informations

Instance Methods [hide private]
 
__init__(self, host, port, cm, cid)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
associate(self, callback, errorCallback)
Associate this connection with the caller.
source code
 
free(self, newTimeout)
Release this connection.
source code
 
isFree(self)
Returns: True if this connection is free.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, host, port, cm, cid)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • host - the host to connect to
  • port - the port to connect to
  • cm - reference to the communication manager
  • cid - the socket to use
Overrides: object.__init__

associate(self, callback, errorCallback)

source code 

Associate this connection with the caller.

Parameters:
  • callback - will be use when normal events are received
  • errorCallback - will be use when erroneous events are received

free(self, newTimeout)

source code 

Release this connection.

Parameters:
  • newTimeout - time, in seconds, to wait before closing the connection

isFree(self)

source code 
Returns:
True if this connection is free.