Table of contents Index

class Proxy - Base class for the proxies.

Declared in module Proxy

Inheritance hierarchy:

Proxy.Proxy
  Zorp.ZorpProxy

Synopsis

class Proxy(ZorpProxy):
    def Proxy.Proxy.__init__(self, name, session) # Initializes a Proxy instance.
    def Proxy.Proxy.addPolicy(self, klass) # Adds a policy to the proxy.
    def Proxy.Proxy.connectServer(self, host, port) # Callback method called when a connection established

    # Inherited from Zorp.ZorpProxy
    def Zorp.ZorpProxy.__init__(self, name, session_id, client_stream) # Initialize a low level proxy instance.

Description

It is inherited from an ExtensionClass implemented in C. The exact proxy module is determined by the name parameter passed to the constructor.

Attributes:

session
descriptor of the connection


Proxy.Proxy.__init__(self, name, session)

Initializes a Proxy instance.

name
The type of the proxy
session
reference to the session
Initializes a Proxy instance and sets attributes.

Proxy.Proxy.addPolicy(self, klass)

Adds a policy to the proxy.

self
this instance
klass
the class implementing the policy
This function extends this class with another parent class at runtime. It can be used to add methods to this event handler class based on some runtime variable.

Proxy.Proxy.connectServer(self, host, port)

Callback method called when a connection established

self
this instance
host
The address of the server
port
The port of the server
If the chainer is defined, it is called with the given host and port parameters to connect to the remote server.If there is no chainer defined, it tries to return the server-side fd from the session. If there's no server_fd it raises an error.

Returns:

The descriptor of the server stream
Copyright © 2000 BalaBit IT Ltd.
Written by: Balázs Scheidler