Table of contents Index

class Chainer - Helper class to establish server-side connections.

Declared in module Chainer

Synopsis

class Chainer:
    def Chainer.Chainer.connectServer(self, session, host, port) # Connect to the targeted server.
    def Chainer.Chainer.establishConnection(self, session, local, remote) # Function to actually establish the connection.

Description

Chainer is used to chain to the remote server in the top session. In stacked sessions chainer is None, which means to chain up to the parent proxy.



Chainer.Chainer.connectServer(self, session, host, port)

Connect to the targeted server.

self
this instance
session
Session object
host
host to connect to (sockaddr).

This is an interface function to be called to chain up to the parent proxy (or to the remote server)

Host and port are hints, they may be ignored (depending on the Chainer)



Chainer.Chainer.establishConnection(self, session, local, remote)

Function to actually establish the connection.

self
this instance
session
Session object
local
bind address
remote
host to connect to

Internal function to establish a connection with the given local and remote addresses. It is used by different chainers after finding out where to connect.

Returns:

The fd of the connection to the server
Copyright © 2000 BalaBit IT Ltd.
Written by: Balázs Scheidler