This module implements a Python wrapper around the ZorpConnect class implemented in C.
import Zorp
Module defining global constants, and interface entry points to the Zorp core.
This class is a simple wrapper around the ZorpConnect class implemented by the Zorp core, and as such it'll be a placeholder for extensions implemented in Python.
Table 4-19. Attributes for class Connect
local | Address of local end of the connection |
remote | Address where we connect |
connect | a Zorp.Connect object |
Initializes a Connect instance.
__init__ ( self, local, remote, callback=None, ) |
Sets the attributes based on constructor parameters, and start connecting in a separate thread if callback is not None.
Table 4-20. Arguments for Connect.__init__()
self | this instance |
local | Address of local end of the connection |
remote | Address where we connect |
callback | Callback to be called when the connection is established. If this is None callback is not used, and blockingConnect should be called to really establish a connection. |
Establish a connection in blocking mode.
blockingConnect ( self ) |
Establishes the connection and returns its file descriptor.
Table 4-21. Arguments for Connect.blockingConnect()
self | this instance |
the fd
Destroy this connector instance.
destroy ( self ) |
Stop connecting and destroy the underlying ZorpConnect instance.
Table 4-22. Arguments for Connect.destroy()
self | instance |