Table of contents Index
class Connect - A wrapper class around the ZorpConnect class implemented in C.
Declared in module Connector
Synopsis
class Connect:
def Connector.Connect.__init__(self, local, remote, callback=None) # Initializes a Connect instance.
def Connector.Connect.blockingConnect(self) # Establish a connection in blocking mode.
def Connector.Connect.destroy(self) # Destroy this connector instance.
Description
Attributes:
-
local
- Address of local end of the connection
-
remote
- Address where we connect
-
connect
- a Zorp.Connect object
Initializes a Connect instance.
- self
- this instance
- local
- Address of local end of the connection
- remote
- Address where we connect
- callback=None
- Callback to be called when the connection is
established. If this is None blockingConnect
should be called.
Sets the attributes based on constructor parameters,
and start connecting in a separate thread if
callback is not None.
Connector.Connect.blockingConnect(self)
Establish a connection in blocking mode.
- self
- this instance
Establishes the connection and returns its fd.
Returns:
the fd
Connector.Connect.destroy(self)
Destroy this connector instance.
- self
- instance
Stop connecting and destroy the underlying ZorpConnect
instance.
Copyright © 2000 BalaBit IT Ltd.
Written by: Balázs Scheidler