RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TAbstractSocket.Port Property

Specifies the ID number that identifies the server socket connection.

Pascal
property Port: Integer;
C++
__property int Port;

Port numbers allow a single system, identified by the Host or Address property, to host multiple connections simultaneously. Many values of Port are associated by convention with a particular service such as ftp or http. 

For server sockets, Port is the ID of the connection on which the server socket listens for client requests. Server sockets generally set Port to a predefined value which clients can use to initiate connections. 

For client sockets, Port is the ID of the desired server connection. The value of Port is usually associated with the service the client wishes to use on the server application.

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

 

Address 

ESocketError 

Host 

Service 

SetPort

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!