OptoMMP2
Opto22.StreamsHelper.Udp Class Reference

Local UDP encapsulation library only for the streaming assemblies. Do not use in your project. More...

Public Member Functions

int Open (int i32Port)
 Open a UDP/IP client object. More...
 
void Close ()
 Close the UDP/IP client object. More...
 
int Receive (byte[] byary, int i32TimeoutMs, ref EndPoint RemoteEP)
 Receive data from the UDP/IP client object. More...
 
int Send (byte[] byary, int i32Tx_Length, EndPoint SourceEndPoint)
 Send data to the UDP/IP server. More...
 
void Empty ()
 Empty the receive buffer. More...
 

Detailed Description

Local UDP encapsulation library only for the streaming assemblies. Do not use in your project.

Member Function Documentation

void Opto22.StreamsHelper.Udp.Close ( )

Close the UDP/IP client object.

void Opto22.StreamsHelper.Udp.Empty ( )

Empty the receive buffer.

int Opto22.StreamsHelper.Udp.Open ( int  i32Port)

Open a UDP/IP client object.

Parameters
i32PortPort number to bind the connection too.
Returns
int Opto22.StreamsHelper.Udp.Receive ( byte[]  byary,
int  i32TimeoutMs,
ref EndPoint  RemoteEP 
)

Receive data from the UDP/IP client object.

Parameters
byaryByte array to store data
i32TimeoutMsTimeout in milliseconds
RemoteEPEndpoint this packet arrived from
Returns
Greater than zero indicates bytes received, zero indicates timeout, -1 is a fault.
int Opto22.StreamsHelper.Udp.Send ( byte[]  byary,
int  i32Tx_Length,
EndPoint  SourceEndPoint 
)

Send data to the UDP/IP server.

Parameters
byaryBytes to send, at least i32Tx_Length in length.
i32Tx_LengthNumber of bytes to send.
SourceEndPointThe source of this message.
Returns
0 if successful, -1 if there is a socket error.

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