C# Class PBCaGw.Services.TcpManager

Handles all the TCP/IP connections and stores the chains corresponding to it.
Mostrar archivo Open project: ISISComputingGroup/EPICS-epicssharp

Public Methods

Method Description
DisposeAll ( ) : void
GetClientChain ( IPEndPoint endPoint ) : WorkerChain

Registers or retreive a client (MEDM) chain.

GetIocChain ( Gateway gateway, IPEndPoint endPoint ) : WorkerChain

Registers or retreive a server (IOC) chain.

SendClientPacket ( DataPacket packet ) : void

Sends a packet to a client connection

SendIocPacket ( Gateway gateway, DataPacket packet ) : void

Sends a packet to a server connection

Private Methods

Method Description
BufferFlusher ( ) : void

Flushes the buffers every now and then

DisposeSocket ( Socket socket ) : void

Disposes a socket

DropClientConnection ( IPEndPoint iPEndPoint ) : void

Removes a client (request) chain. Could be triggered from a dispose of the TcpReceiver even in the IOC chain therefore we must check if the chain is indeed a client chain.

DropServerConnection ( WorkerChain chain ) : void

Removes an IOC (response) chain

RegisterClient ( IPEndPoint iPEndPoint, WorkerChain chain ) : void

Called by the TCP Listener when receiving a new connection. Stores a client (request) chain.

SocketConnect ( Socket socket, EndPoint endPoint, int connTimeout ) : bool
TcpManager ( ) : System

Creates the buffer dictionary

Method Details

DisposeAll() public static method

public static DisposeAll ( ) : void
return void

GetClientChain() public static method

Registers or retreive a client (MEDM) chain.
public static GetClientChain ( IPEndPoint endPoint ) : WorkerChain
endPoint System.Net.IPEndPoint
return PBCaGw.Workers.WorkerChain

GetIocChain() public static method

Registers or retreive a server (IOC) chain.
public static GetIocChain ( Gateway gateway, IPEndPoint endPoint ) : WorkerChain
gateway Gateway
endPoint System.Net.IPEndPoint
return PBCaGw.Workers.WorkerChain

SendClientPacket() public static method

Sends a packet to a client connection
public static SendClientPacket ( DataPacket packet ) : void
packet DataPacket
return void

SendIocPacket() public static method

Sends a packet to a server connection
public static SendIocPacket ( Gateway gateway, DataPacket packet ) : void
gateway Gateway
packet DataPacket
return void