OptoMMP2
ip4.Tcp_Server Class Reference

TCP/IP server-side helper. More...

Public Member Functions

 Tcp_Server ()
 Constructor More...
 
int Open (int i32SourcePort, int i32Backlog)
 Opens a TCP/IPv4 or IPv6 Server More...
 
void Close ()
 Closes the TCP/IP Server. Do this only on application exit. More...
 
bool Accept (ref Socket ClientSocket, int i32Timeout_Ms, ref EndPoint RemoteEndpoint)
 Accept an incoming TCP/IP connection. More...
 

Detailed Description

TCP/IP server-side helper.

Constructor & Destructor Documentation

ip4.Tcp_Server.Tcp_Server ( )

Constructor

Member Function Documentation

bool ip4.Tcp_Server.Accept ( ref Socket  ClientSocket,
int  i32Timeout_Ms,
ref EndPoint  RemoteEndpoint 
)

Accept an incoming TCP/IP connection.

Parameters
ClientSocketA socket to store the incoming TCP/IP connection.
i32Timeout_MsNumber of milliseconds to wait for an incoming connect request.
RemoteEndpointThe remote endpoint so application can check to see if this is a valid host.
Returns
true if a connection arrives, if so, ClientSocket is valid.
void ip4.Tcp_Server.Close ( )

Closes the TCP/IP Server. Do this only on application exit.

int ip4.Tcp_Server.Open ( int  i32SourcePort,
int  i32Backlog 
)

Opens a TCP/IPv4 or IPv6 Server

Parameters
i32SourcePortTCP/IP port to bind too. This is the service port location typically from 1024 to 65535
i32BacklogNumber of incoming TCP/IP connect requests to backlog.
Returns
0 indicates success, -1 indicates a connection failure.

The documentation for this class was generated from the following file: