Datasnap.Win.MConnect.TCustomObjectBroker.GetPortForComputer
Delphi
function GetPortForComputer(const ComputerName: string): Integer; virtual; abstract;
C++
virtual int __fastcall GetPortForComputer(const System::UnicodeString ComputerName) = 0 ;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | Datasnap.Win.MConnect.pas Datasnap.Win.MConnect.hpp |
Datasnap.Win.MConnect | TCustomObjectBroker |
Description
Returns a port number for connecting to a specified remote server.
Socket connection components call GetPortForComputer to get a value for their Port property. The ComputerName parameter specifies a Host name or IP address that was returned by GetComputerForGUID or GetComputerForProgID.
None of the connection components that work on Linux explicitly use a Port number. GetPortForComputer is included in TCustomObjectBroker to allow for the possibility of connection components that use an explicit Port number. The ComputerName parameter is a Host name or IP address that is returned by the GetComputerForGUID or GetComputerForProgID method.
TCustomObjectBroker declares GetPortForComputer as an abstract (pure virtual) method. It is implemented in descendant objects that return a string designed to work with a particular connection component.
Note: This interface assumes that a single socket dispatcher on each server system handles all client requests, even when they are destined for different application servers on the same host.