def __init__(self, address, blocking=1, timeout=15): """Initialize an object with an address and an optional blocking flag.""" self.header = '' self.timeout = timeout ClientServerSocket.__init__(self, address, blocking=blocking)
def __init__(self, address, timeout=TimeoutInterval, keepalive=0, **kwargs): """Initialize the object by setting an authenticated flag to keep track of whether or not the connection has been authenticated yet or not.""" self.authenticated = 0L self.timeout = timeout self.keepalive = keepalive self.authMsgSent = 0 # the actual address will be decided when open is called ClientServerSocket.__init__(self, address, **kwargs)