OptoMMP2
ip4.Udp_Server Class Reference

Udp Server More...

Public Member Functions

 Udp_Server ()
 Constructor. More...
 
Int32 Open6 (Int32 i32SourcePort)
 Open a UDP/IPV6 Server More...
 
int Open (int i32SourcePort)
 Open a UDP/IP Server Object More...
 
void Close ()
 Close the UDP/IP Server Object More...
 
int Receive (byte[] byary, int i32Timeout_Ms, ref EndPoint SourceEndpt)
 Receive Data From the UDP/IP Server Socket More...
 
int Send (byte[] byary, int i32Tx_Length, EndPoint SourceEndpt)
 Sends data to a specific endpoint. More...
 
Socket Get_Socket ()
 Gets a copy of the socket structure. More...
 
void Set_Socket (Socket Socket)
 Sets this object's server socket. More...
 

Detailed Description

Udp Server

Constructor & Destructor Documentation

ip4.Udp_Server.Udp_Server ( )

Constructor.

Member Function Documentation

void ip4.Udp_Server.Close ( )

Close the UDP/IP Server Object

Socket ip4.Udp_Server.Get_Socket ( )

Gets a copy of the socket structure.

Returns
The socket.
int ip4.Udp_Server.Open ( int  i32SourcePort)

Open a UDP/IP Server Object

Parameters
i32SourcePortThe source port. Range is typically 1024 through 65535
Returns
0 is OK, -1 is a socket creation or bind error
Int32 ip4.Udp_Server.Open6 ( Int32  i32SourcePort)

Open a UDP/IPV6 Server

Parameters
i32SourcePortServer port to open.
Returns
0 is successful, -1 is error, probably the port number is already in use or no permission to use it
int ip4.Udp_Server.Receive ( byte[]  byary,
int  i32Timeout_Ms,
ref EndPoint  SourceEndpt 
)

Receive Data From the UDP/IP Server Socket

Parameters
byaryA byte array who's length determines the maximum receive size.
i32Timeout_MsThe number of milliseconds to wait for data.
SourceEndptThe source of where the packet comes from.
Returns
Positive values for data, zero for timeout, -1 for socket faults
int ip4.Udp_Server.Send ( byte[]  byary,
int  i32Tx_Length,
EndPoint  SourceEndpt 
)

Sends data to a specific endpoint.

Parameters
byaryByte array to transmit, at least i32Tx_Length long.
i32Tx_LengthThe number of bytes to transmit of the array starting at index 0.
SourceEndptThe destination endpoint where to send this data too.
Returns
Positive values are okay, negative values indicate connection fault.
void ip4.Udp_Server.Set_Socket ( Socket  Socket)

Sets this object's server socket.

Parameters
Socket

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