System.Win.ScktComp.TClientSocket.Service
Delphi
property Service;
C++
__property Service = {default=0};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | published | System.Win.ScktComp.pas System.Win.ScktComp.hpp |
System.Win.ScktComp | TClientSocket |
Description
Specifies the name of the service for which the socket connection is used.
System.Win.ScktComp.TClientSocket.Service inherits from System.Win.ScktComp.TAbstractSocket.Service. All content below this line refers to System.Win.ScktComp.TAbstractSocket.Service.
Specifies the name of the service for which the socket connection is used.
Use Service to identify the use of the connection. Windows provides There are a number of standard service names such as ftp, http, finger, and time. Servers can specify additional services and their associated ports in a SERVICES file. For more information, see the Microsoft documentation for Windows sockets.
Certain port numbers are reserved for specific values of service. Thus, Service provides a more meaningful way to specify the server Port to use for the socket connection. For server sockets, using Service rather than Port ensures that the server will listen for TCP/IP requests on the appropriate port.
Note: Trying to change Service when the connection is open will raise an ESocketError exception.