C# Class ModServer.TCPserver

Override this class and implement the abstract methods to set up a TCP server with custom protocol matchers and handlers.
Datei anzeigen Open project: tyandjel94/RowanParkingPassApp

Public Properties

Property Type Description
HTTP System.Text.RegularExpressions.Regex
STR_HTTP String
TCP_CHUNK_SIZE int

Public Methods

Method Description
Disconnect ( TcpClient client ) : void
DisconnectAll ( string ip ) : void
TCPserver ( int port ) : System
getLocalIP ( ) : IPAddress
kill ( ) : void
start ( ) : void

Protected Methods

Method Description
DisconnectAll ( ) : void
HandleClientComm ( TcpClient client, IProtocolMatcher protocols ) : void
ListenForClients ( ) : void
generateProtocolEngines ( TcpClient client ) : IProtocolMatcher[]
proccessUnknownProtocol ( ) : void

Add some functionality and arguments

Private Methods

Method Description
LocalIPAddress ( ) : IPAddress

Method Details

Disconnect() public method

public Disconnect ( TcpClient client ) : void
client System.Net.Sockets.TcpClient
return void

DisconnectAll() protected method

protected DisconnectAll ( ) : void
return void

DisconnectAll() public method

public DisconnectAll ( string ip ) : void
ip string
return void

HandleClientComm() protected method

protected HandleClientComm ( TcpClient client, IProtocolMatcher protocols ) : void
client System.Net.Sockets.TcpClient
protocols IProtocolMatcher
return void

ListenForClients() protected method

protected ListenForClients ( ) : void
return void

TCPserver() public method

public TCPserver ( int port ) : System
port int
return System

generateProtocolEngines() protected abstract method

protected abstract generateProtocolEngines ( TcpClient client ) : IProtocolMatcher[]
client System.Net.Sockets.TcpClient
return IProtocolMatcher[]

getLocalIP() public static method

public static getLocalIP ( ) : IPAddress
return System.Net.IPAddress

kill() public method

public kill ( ) : void
return void

proccessUnknownProtocol() protected method

Add some functionality and arguments
protected proccessUnknownProtocol ( ) : void
return void

start() public method

public start ( ) : void
return void

Property Details

HTTP public_oe static_oe property

public static Regex,System.Text.RegularExpressions HTTP
return System.Text.RegularExpressions.Regex

STR_HTTP public_oe static_oe property

public static String STR_HTTP
return String

TCP_CHUNK_SIZE public_oe property

public int TCP_CHUNK_SIZE
return int