System.Win.ScktComp.TCustomWinSocket.LookupService

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function LookupService(const service: string): Integer;

C++

int __fastcall LookupService(const System::UnicodeString service);

Properties

Type Visibility Source Unit Parent
function public
System.Win.ScktComp.pas
System.Win.ScktComp.hpp
System.Win.ScktComp TCustomWinSocket

Description

Returns the port number associated with a specific service.

Call LookupService to obtain the standard port number for the service named by the service parameter. Windows provides a number of standard service names such as ftp, http, finger, or time. Each standard service is associated, by convention, with a specific port number. These standard port numbers allow client sockets to indicate the desired service by requesting a specific port number. They allow server sockets to listen on an expected port number for the service offered. Servers can specify additional services and their associated ports in a SERVICES file. For more information on the SERVICES file, see the Microsoft documentation for Windows sockets.

InitSocket calls LookupService to obtain the port number for the Service specified by a socket component.

See Also