UDPPort Component

The UDPPort control is used to facilitate UDP (datagram) communications. It can act both as a client and a server and communicate with any number of hosts simultaneously, as well as generate and receive broadcast packets.

(NOTE: The following is a very short description. For more information, please consult the help files that come with the respective package.)


The interface of the control is similar to the interface of IPPort, only much simpler. The control is activated/deactivated through the Active property. This property enables or disables sends or receives. The data can be sent in the same way as IPPort, using the DataToSend property. The destination is specified using the RemoteHost and RemotePort properties. Inbound data is received through the DataIn event.

If the UseConnection property is set to True, then a local association is created with the remote host. Otherwise, the control can receive datagrams (packets) from any host, and send datagrams to any host. Packets can be broadcasted on the local net by setting the destination (RemoteHost) to 255.255.255.255.

The operation of the control is almost completely asynchronous. All calls, except the ones that deal with domain name resolution, operate through Windows messages (no blocking calls). The gain in performance is considerable when compared to using blocking calls.

This control requires a Winsock 1.1 compliant TCP/IP stack. This means that the Winsock stack installed in the system must have a version of at least 1.1. In particular, Windows 95, 98, and NT machines with Winsock 2.0 are fully supported.


   PROPERTIES

AcceptData. Enables or disables data reception (the DataIn event).

Active. Enables or disables sending and receiving of data. Action property.

DataToSend. A string of data to be sent to the remote host. Write-only property.

DontRoute. If set to True, forces the socket to send data directly to interface (no routing).

InBufferSize. The size in bytes of the incoming queue of the socket.

LocalHost. The name of the local host or user-assigned IP interface through which connections are accepted or initiated.

LocalPort. The UDP port in the local host where UDPPort binds.

MaxPacketSize. The maximum length of the packets that can be received.

OutBufferSize. The size in bytes of the outgoing queue of the socket.

RemoteHost. The address of the remote host. Domain names are resolved to IP addresses.

RemotePort. The UDP port in the remote host.

SocketHandle. The handle of the main socket used by the control.

UseConnection. If set, the control connects to the RemoteHost.

WinsockInfo. Identifying information about the loaded Winsock stack.

WinsockLoaded. Loads and unloads Winsock on demand.

WinsockMaxDatagramSize. Size in bytes of the largest UDP datagram that can be sent or received.

WinsockMaxSockets. Maximum number of sockets available to a single process.

WinsockPath. The path to the Winsock DLL used.

WinsockStatus. The status of the Winsock stack.

   EVENTS

DataIn. Fired when data is received.

Error. Information about errors during data delivery.

ReadyToSend. Fired when the control is ready to send data.


© 1999 devSoft Inc. - All Rights Reserved.
devSoft Inc.,  P.O.Box 13821 , Research Triangle Park, NC 27709 , USA,