UDPPort Bean
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 bean is similar to the interface of IPPort, only much simpler. The bean 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 bean 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 bean 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 bean with short descriptions. Click on the links for further details.
AcceptData | Enables or disables data reception (the DataIn event). |
Active | Enables or disables sending and receiving of data. |
DataToSend | A string of data to be sent to the remote host. Write-only property. |
DontRoute | If set to True, it forces the socket to send data directly to interface (no routing). |
LocalHost | The name of the local host or user-assigned IP interface through which connections are initiated or accepted. |
LocalPort | The UDP port in the local host where UDPPort binds. |
RemoteHost | The address of the remote host. Domain names are resolved to IP addresses. |
RemotePort | The UDP port in the remote host. |
TimeToLive | The maximum number of subnets that a datagram can traverse. |
Method List
The following is the full list of the methods of the bean with short descriptions. Click on the links for further details.
config | Sets or retrieves a configuration setting . |
doEvents | Processes events from the internal message queue. |
send | Send data to the remote host. |
Event List
The following is the full list of the events fired by the bean with short descriptions. Click on the links for further details.
DataIn | Fired when data is received. |
Error | Information about errors during data delivery. |
ReadyToSend | Fired when the component is ready to send data. |
Configuration Settings
The following is a list of configuration settings for the bean with short descriptions. Click on the links for further details.
CaptureIPPacketInfo | Used to capture the packet information. |
DestinationAddress | Used to get the destination address from the packet information. |
DontFragment | Used to set the Don't Fragment flag of outgoing packets. |
LocalHost | The name of the local host through which connections are initiated or accepted. |
LocalPort | The TCP port in the local host where the component binds. |
MaxPacketSize | The maximum length of the packets that can be received. |
ShareLocalPort | If set to True, allows more than one instance of the component to be active on the same local port. |
UseConnection | Determines whether to use a connected socket. |
QOSDSCPValue | Used to specify an arbitrary QOS/DSCP setting (optional). |
QOSTrafficType | Used to specify QOS/DSCP settings (optional). |
UseIPv6 | Whether or not to use IPv6. |
AbsoluteTimeout | Determines whether timeouts are inactivity timeouts or absolute timeouts. |
FirewallData | Used to send extra data to the firewall. |
InBufferSize | The size in bytes of the incoming queue of the socket. |
OutBufferSize | The size in bytes of the outgoing queue of the socket. |
CodePage | The system code page used for Unicode to Multibyte translations. |