TCnTcpClient Class

Provides client connections for TCP network services.

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

The TCnTcpClient type exposes the following members.

Show:
 NameDescription
Create(TComponent)

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

Destroy

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

Top
Show:
 NameDescription
Available

Gets the amount of data that has been received from the network and is available to be read.

Client

Gets or sets the underlying Socket.

Connected

Gets a value indicating whether the underlying Socket for a TcpClient is connected to a remote host.

DefaultClrObject

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

ExclusiveAddressUse

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

LingerState

Gets or sets information about the linger state of the associated socket.

NoDelay

Gets or sets a value that disables a delay when send or receive buffers are not full.

ReceiveBufferSize

Gets or sets the size of the receive buffer.

ReceiveTimeout

Gets or sets the amount of time a TcpClient will wait to receive data once a read operation is initiated.

SendBufferSize

Gets or sets the size of the send buffer.

SendTimeout

Gets or sets the amount of time a TcpClient will wait for a send operation to complete successfully.

Top
Show:
 NameDescription
Close

Disposes this TcpClient instance and requests that the underlying TCP connection be closed.

Connect(String,Integer)

Overloaded. Connects the client to the specified port on the specified host.

Connect(TArray,Integer)

Overloaded. Connects the client to a remote TCP host using the specified IP addresses and port number.

Connect(_IPAddress,Integer)

Overloaded. Connects the client to a remote TCP host using the specified IP address and port number.

Connect(_IPAddressArray,Integer)

Overloaded. Connects the client to a remote TCP host using the specified IP addresses and port number.

Connect(_IPEndPoint)

Overloaded. Connects the client to a remote TCP host using the specified remote network endpoint.

ConnectAsync(String,Integer)

Overloaded. Connects the client to the specified TCP port on the specified host as an asynchronous operation.

ConnectAsync(TArray,Integer)

Overloaded. Connects the client to a remote TCP host using the specified IP addresses and port number as an asynchronous operation.

ConnectAsync(_IPAddress,Integer)

Overloaded. Connects the client to a remote TCP host using the specified IP address and port number as an asynchronous operation.

ConnectAsync(_IPAddressArray,Integer)

Overloaded. Connects the client to a remote TCP host using the specified IP addresses and port number as an asynchronous operation.

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.)

GetClrObject

Represents method GetClrObject. (Inherited from TClrBaseComponent.)

GetStream

Returns the NetworkStream used to send and receive data.

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.)

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.