TCnUdpClient Class

Provides User Datagram Protocol (UDP) network services.

Namespace: CNClrLib.Component.UdpClient
TComponent
  CNClrLib.Control.Base.TClrBaseComponent
    CNClrLib.Component.UdpClient.TCnUdpClient
type
 TCnUdpClient = class(TClrBaseComponent)
 end;

The TCnUdpClient type exposes the following members.

Show:
 NameDescription
Create(TComponent)

Creates and initializes a TCnUdpClient instance. (Overrides TClrBaseComponent.Create(TComponent).)

Destroy

Frees the resources allocated with a TCnUdpClient instance. (Overrides TClrBaseComponent.Destroy.)

Top
Show:
 NameDescription
Available

Gets the amount of data received from the network that is available to read.

Client

Gets or sets the underlying network Socket.

DefaultClrObject

Get the common language runtime object interface for this component. (Inherited from TClrBaseComponent.)

DontFragment

Gets or sets a Boolean value that specifies whether the UdpClient allows Internet Protocol (IP) datagrams to be fragmented.

EnableBroadcast

Gets or sets a Boolean value that specifies whether the UdpClient may send or receive broadcast packets.

ExclusiveAddressUse

Gets or sets a Boolean value that specifies whether the UdpClient allows only one client to use a port.

MulticastLoopback

Gets or sets a Boolean value that specifies whether outgoing multicast packets are delivered to the sending application.

TimetoLive

Gets or sets a value that specifies the Time to Live (TTL) value of Internet Protocol (IP) packets sent by the UdpClient.

Top
Show:
 NameDescription
AllowNatTraversal(Boolean)

Enables or disables Network Address Translation (NAT) traversal on a UdpClient instance.

Close

Closes the UDP connection.

Connect(String,Integer)

Overloaded. Establishes a default remote host using the specified host name and port number.

Connect(_IPAddress,Integer)

Overloaded. Establishes a default remote host using the specified IP address and port number.

Connect(_IPEndPoint)

Overloaded. Establishes a default remote host using the specified network endpoint.

Dispose

Releases the resources used by the Component. (Inherited from TClrBaseComponent.)

DoGetDefaultClrObject

Represents method DoGetDefaultClrObject. (Overrides TClrBaseComponent.DoGetDefaultClrObject.)

DoGetDotNetBaseComponent

Represents method DoGetDotNetBaseComponent. (Overrides TClrBaseComponent.DoGetDotNetBaseComponent.)

DropMulticastGroup(_IPAddress)

Overloaded. Leaves a multicast group.

DropMulticastGroup(_IPAddress,Integer)

Overloaded. Leaves a multicast group.

GetClrObject

Represents method GetClrObject. (Inherited from TClrBaseComponent.)

JoinMulticastGroup(Integer,_IPAddress)

Overloaded. Adds a UdpClient to a multicast group.

JoinMulticastGroup(_IPAddress)

Overloaded. Adds a UdpClient to a multicast group.

JoinMulticastGroup(_IPAddress,Integer)

Overloaded. Adds a UdpClient to a multicast group with the specified Time to Live (TTL).

JoinMulticastGroup(_IPAddress,_IPAddress)

Overloaded. Adds a UdpClient to a multicast group.

Receive(_IPEndPoint)

Returns a UDP datagram that was sent by a remote host.

ReceiveAsync

Returns a UDP datagram asynchronously that was sent by a remote host.

Receive_(_IPEndPoint)

Returns a UDP datagram that was sent by a remote host.

RegisterEventCallBack(ClrWString,Pointer)

Add an event to the instance using the specified event name and function pointer which is the event handler. The RegisterEventCallBack method does not directly add the event handler to the event. A hooking mechanism is used such that if the event is fired, the hook event is also fired which in turn calls the function pointer. (Inherited from TClrBaseComponent.)

RegisterEventSource

Register the Delphi object which will raise the .Net event handler. (Inherited from TClrBaseComponent.)

Send(TArray,Integer)

Overloaded. Sends a UDP datagram to a remote host.

Send(TArray,Integer,String,Integer)

Overloaded. Sends a UDP datagram to a specified port on a specified remote host.

Send(TArray,Integer,_IPEndPoint)

Overloaded. Sends a UDP datagram to the host at the specified remote endpoint.

Send(_ByteArray,Integer)

Overloaded. Sends a UDP datagram to a remote host.

Send(_ByteArray,Integer,String,Integer)

Overloaded. Sends a UDP datagram to a specified port on a specified remote host.

Send(_ByteArray,Integer,_IPEndPoint)

Overloaded. Sends a UDP datagram to the host at the specified remote endpoint.

SendAsync(TArray,Integer)

Overloaded. Sends a UDP datagram asynchronously to a remote host.

SendAsync(TArray,Integer,String,Integer)

Overloaded. Sends a UDP datagram asynchronously to a remote host.

SendAsync(TArray,Integer,_IPEndPoint)

Overloaded. Sends a UDP datagram asynchronously to a remote host.

SendAsync(_ByteArray,Integer)

Overloaded. Sends a UDP datagram asynchronously to a remote host.

SendAsync(_ByteArray,Integer,String,Integer)

Overloaded. Sends a UDP datagram asynchronously to a remote host.

SendAsync(_ByteArray,Integer,_IPEndPoint)

Overloaded. Sends a UDP datagram asynchronously to a remote host.

UnRegisterEventCallBack(ClrWString,Pointer)

Remove an event from the instance using the specified event name and function pointer which is the event handler. (Inherited from TClrBaseComponent.)

UnRegisterEventSource

Unregister the Delphi object which raised the .Net event handler. (Inherited from TClrBaseComponent.)

Top

See C:\Users\Public\Documents\CrystalNet Technologies\.Net VCL for Delphi Demo Folder after installation for examples of how to use this component.