Function SocketGetServByName() Professional
Retrieves internet service information from a service name and protocol.
Syntax
SocketGetServByName( <cServiceName> , ;
[<cProtocolName>] ) --> aServiceInfo|NIL
Parameters
<cServiceName>
A character string containing the name of the internet service.
<cProtocolName>
A character string containing the name of a protocol. If this parameter is omitted, information of the first internet service is returned where <cServiceName> matches the name of the service or one of its alias names.
Return
The function returns an array containing service information, or NIL on failure. The following #define constants are available in the file SOCKET.CH to access the individual elements of the service array:
Constants for the service array
Constant | Description |
---|---|
SERVINFO_ALIAS | One-dimensional array holding character strings with the alias names of a service. |
SERVINFO_CNAME | The service name as character string |
SERVINFO_CPROT | The name of the underlying protocol used for the service. |
SERVINFO_NPORT | The port number at which the service is available in network byte order. |
Feedback
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.