Table of Contents

OIL2 Class Local.ForwardConnection


class Local . ForwardConnection {
        array   destAddrList;
        int32   destinationCount;
        string  forwardingClassName;
        string  listenAddress;
        oid     listenObj;
        int32   nextDestIndex;
inherits from Standard.Object;

DESCRIPTION

This is an experimental class that forwards TCP connections in a round-robin fashion to to a pool of servers.

METHODS


Local.ForwardConnection:create

ForwardConnection:create(string listenAddr, string connAddr1, optional string connAddr2)

Method Description

See initialize. The forwarding class name is set to ConnectAndForward.


Local.ForwardConnection:initialize

ForwardConnection:initialize(string listenAddr, string connAddr1, optional string connAddr2)

Method Description

The create method takes a minimum of two arguments. The first argument, listenAddr, specifies the transport address at which a listen port should be created. It is provided to an AcceptConnection object that is created to handle incoming requests. The second and all remaining arguments indicate transport addresses to which new connections should be forwarded.


Local.ForwardConnection:setForwardingClass

ForwardConnection:setForwardingClass(string className)

Method Description

Change name of forwarding class name.


Local.ForwardConnection:connectionAccepted

ForwardConnection:connectionAccepted(oid source)

Method Description

After a new connecion is accepted from a client, a ConnectAndForward object is created to establish a connection to a server and forward any data between the two end points.


Local.ForwardConnection:failedConnection

ForwardConnection:failedConnection(string destAddr, oid src, int32 tries)

Method Description

If a ConnectAndForward object fails to establish a connection to a server, it sends a failedConnection message to the associated ForwardConnection object in order to initiate a connection attempt to an alternate server. The transport address of the failed server is provided as destAddr. The object Id of the incoming IOobject object is provided in src. The total number of servers that have been probed is specified in tries.