System.Win.ScktComp.TClientSocket.Host

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property Host: string read FHost write SetHost default 0;

C++

__property Host = {default=0};

Properties

Type Visibility Source Unit Parent
property published
System.Win.ScktComp.pas
System.Win.ScktComp.hpp
System.Win.ScktComp TClientSocket

Description

Specifies an alias for the IP address of the server system.

System.Win.ScktComp.TClientSocket.Host inherits from System.Win.ScktComp.TAbstractSocket.Host. All content below this line refers to System.Win.ScktComp.TAbstractSocket.Host.

Specifies an alias for the IP address of the server system.

Host is a string containing the domain name and service of a particular system, such as http://www.example.com.

For client sockets, set Host to the system with which the client socket should form a connection. When the socket opens a connection, it looks up the IP address for the server socket using the value of Host.

Some servers change the system or IP address that is associated with a particular host name. Using a host name allows the client socket to find the abstract site represented by the host name, even when it has moved to a new IP address.

If Host is set, it takes precedence over the Address property when looking up the address of the server.

Note: Trying to change Host when the connection is open will raise an ESocketError exception.

See Also