UDPPort Component

Properties   Methods   Events   Configuration Settings   Errors  

The UDPPort component 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.

Syntax

ipworks.Udpport

Remarks

The interface of the component is similar to the interface of IPPort, only much simpler. The component 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 Send method and specifying the text to send. This is identical to assigning data to the DataToSend property. The destination is specified using the RemoteHost and RemotePort properties. Inbound data is received through the DataIn event.

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

The operation of the component 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.

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).
ActiveEnables or disables sending and receiving of data.
DataToSendA string of data to be sent to the remote host. Write-only property.
DontRouteIf set to True, it forces the socket to send data directly to interface (no routing).
LocalHostThe name of the local host or user-assigned IP interface through which connections are initiated or accepted.
LocalPortThe UDP port in the local host where UDPPort binds.
RemoteHostThe address of the remote host. Domain names are resolved to IP addresses.
RemotePortThe UDP port in the remote host.
TimeToLiveThe maximum number of subnets that a datagram can traverse.

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.
DoEventsProcesses events from the internal message queue.
ResetReset the component.
SendSend data to the remote host.

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.

DataInFired when data is received.
ErrorInformation about errors during data delivery.
ReadyToSendFired when the component is ready to send data.

Configuration Settings


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

CaptureIPPacketInfoUsed to capture the packet information.
DestinationAddressUsed to get the destination address from the packet information.
DontFragmentUsed to set the Don't Fragment flag of outgoing packets.
LocalHostThe name of the local host through which connections are initiated or accepted.
LocalPortThe port in the local host where the component binds.
MaxPacketSizeThe maximum length of the packets that can be received.
QOSDSCPValueUsed to specify an arbitrary QOS/DSCP setting (optional).
QOSTrafficTypeUsed to specify QOS/DSCP settings (optional).
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.
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.
BuildInfoInformation about the product's build.
GUIAvailableTells the component whether or not a message loop is available for processing events.
LicenseInfoInformation about the current license.
UseDaemonThreadsWhether threads created by the component are daemon threads.
UseInternalSecurityAPITells the component whether or not to use the system security libraries or an internal implementation.

Copyright (c) 2021 /n software inc. - All rights reserved.
IPWorks 2020 Kotlin Edition - Version 20.0 [Build 7941]