Table of contents Index

class InbandChainer - Chainer for protocols where the connection information comes from protocol logic.

Declared in module Chainer

Inheritance hierarchy:

Chainer.InbandChainer
  Chainer.Chainer

Synopsis

class InbandChainer(Chainer):
    def Chainer.InbandChainer.__init__(self, local=None, forge_addr=0) # Initializes an InbandChainer instance.
    def Chainer.InbandChainer.connectServer(self, session, host, port) # Called by the proxy to connect to the remote end.

    # Inherited from Chainer.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

This chainer can be used for protocols where the target address is determined during the communication with the client. An example would be non-transparent HTTP where the target address is sent in the request.

Attributes:

local
the address of the local end of the connection
forge_addr
use the client address for outgoing local address


Chainer.InbandChainer.__init__(self, local=None, forge_addr=0)

Initializes an InbandChainer instance.

self
this instance
local=None
local address
forge_addr=0
forge client address
Creates an instance, sets its attributes.

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

Called by the proxy to connect to the remote end.

self
this instance
session
Session object
host
Remote hostname as determined by the protocol
port
Remote port as determinted by the protocol
Looks up the host in the DNS and starts connecting there.

Returns:

The fd given by establishConnection

Notes:

FIXME: clean this up
Copyright © 2000 BalaBit IT Ltd.
Written by: Balázs Scheidler