IP*Works! RTC - Online Help
Available for:
IP*Works! RTC
Questions / Feedback?

RUDPClient Component

Properties   Methods   Events   Configuration Settings   Errors  

The RUDPClient component is a Reliable UDP client based on an asynchronous, event-driven architecture.

Syntax

nsoftware.IPWorksRTC.Rudpclient

Remarks

The RUDPClient component implements a Reliable UDP client based on RFC 908. Use of RUDPClient guarantees that data is delivered to the remote host using UDP as a transport mechanism.

Our main goal in designing RUDPClient was ease of use. The component has a minimum of properties and events.

The connection is attempted by calling the Connect method or setting the Connected property to True, and then waiting for the Connected event. The destination is defined by setting RemoteHost and RemotePort. Data is sent by calling the Send method with Text as a parameter, or by assigning the data string to the DataToSend property.

To disconnect, call the Disconnect method or set the Connected property to False. The Linger property controls how the connection is terminated.

The operation of the component is can be synchronous or asynchronous depending on the value of Timeout.

Rudpserver server = new Rudpserver();
server.OnDataIn += (s,e) => {
  //The DataIn event fires when data is received.
  Console.WriteLine("Server Received: " + e.Text);
  //Echo text back
  server.Connections[e.ConnectionId].DataToSend = e.Text;
};

server.LocalPort = 4444;
server.Listening = true;

Rudpclient client = new Rudpclient();
client.OnDataIn += (s, e) => {
  //The DataIn event fires when data is received.
  Console.WriteLine("Client Received: " + e.Text);
};

client.Connect("localhost", 4444);

//Send data to the server
client.DataToSend = "Hello World!";

Property List


The following is the full list of the properties of the component with short descriptions. Click on the links for further details.

AcceptDataEnables or disables data reception (the DataIn event).
BytesSentThe number of bytes actually sent after an assignment to DataToSend .
ConnectedTriggers a connection or disconnection.
DataToSendA string of data to be sent to the remote host.
KeepAliveWhen True, KeepAlive packets are enabled (for long connections).
LingerWhen set to True, connections are terminated gracefully.
LocalHostThe name of the local host or user-assigned IP interface through which connections are initiated or accepted.
LocalPortThe port in the local host to which the component binds.
RemoteHostThe address of the remote host. Domain names are resolved to IP addresses.
RemotePortThe UDP port in the remote host.
TimeoutA timeout for the component.

Method List


The following is the full list of the methods of the component with short descriptions. Click on the links for further details.

ConfigSets or retrieves a configuration setting .
ConnectConnects to a remote host.
DisconnectDisconnects from the remote host.
DoEventsProcesses events from the internal message queue.
InterruptInterrupts the current action.
SendSends data to the remote host.
SendFileSends file to the remote host.
SendKeepAliveSends a keepalive packet.
SetReceiveStreamSets the stream to which received data will be written.
SetSendStreamReads content from the stream and sends it to the server.

Event List


The following is the full list of the events fired by the component with short descriptions. Click on the links for further details.

ConnectedFired immediately after a connection completes.
ConnectionStatusFired to indicate changes in connection state.
DataInFired when data comes in.
DisconnectedFired when a connection is closed.
ErrorInformation about errors during data delivery.
ReadyToSendFired when the component is ready to send data.
StatusFires with information about the operation.

Configuration Settings


The following is a list of configuration settings for the component with short descriptions. Click on the links for further details.

KeepAliveTimeThe inactivity time in seconds before a keep-alive packet is sent.
KeepAliveIntervalThe retry interval, in seconds, to be used when a keep-alive packet is sent and no response is received.
KeepAliveRetryCountThe number of times to retry sending the keep-alive packet when there is no response.
RetransmitTimeoutThe timeout in milliseconds between retransmit attempts.
MaxRetransmitCountThe maximum number of retransmission attempts.
LogOptionsThe level of messages to log.
MaxIncomingSegmentSizeThe maximum segment size in bytes.
MaxIncomingOutstandingCountThe maximum number of outstanding segments.
SequencedDeliveryWhether the connection uses sequenced delivery.
MaxOutgoingSegmentSizeThe maximum segment size of the other party in bytes.
MaxOutgoingOutstandingCountThe maximum number of outstanding segments when sending to other party.
CaptureIPPacketInfoUsed to capture the packet information.
DestinationAddressUsed to get the destination address from the packet information.
LocalHostThe name of the local host through which connections are initiated or accepted.
LocalPortThe TCP port in the local host where the component binds.
MaxPacketSizeThe maximum length of the packets that can be received.
ShareLocalPortIf set to True, allows more than one instance of the component to be active on the same local port.
UseConnectionDetermines whether to use a connected socket.
QOSDSCPValueUsed to specify an arbitrary QOS/DSCP setting (optional).
QOSTrafficTypeUsed to specify QOS/DSCP settings (optional).
UseIPv6Whether or not to use IPv6.
AbsoluteTimeoutDetermines whether timeouts are inactivity timeouts or absolute timeouts.
FirewallDataUsed to send extra data to the firewall.
InBufferSizeThe size in bytes of the incoming queue of the socket.
OutBufferSizeThe size in bytes of the outgoing queue of the socket.
AbsoluteTimeoutDetermines whether timeouts are inactivity timeouts or absolute timeouts.
FirewallDataUsed to send extra data to the firewall.
InBufferSizeThe size in bytes of the incoming queue of the socket.
OutBufferSizeThe size in bytes of the outgoing queue of the socket.
CodePageThe system code page used for Unicode to Multibyte translations.

 
 
Copyright (c) 2016 /n software inc. - All rights reserved.
Build 1.0.6093.0