Function SocketGetProtoByNumber() Professional

Retrieves protocol information from a protocol number.

Syntax
SocketGetProtoByNumber( <nProtocolNumber>, ;
                        [@<nError>]        ) --> aProtocolInfo|NIL
Parameters
<nProtoNumber>
This is the numeric protocol identifier in host byte order.
<nError>
If this parameter is passed by reference to the function, it gets assigned a numeric error code when the function fails. #define constants beginning with WSAE are available in the file SOCKET.CH to identify an error condition.
Return

The function returns an array containing protocol information, or NIL on failure. The following #define constants are available in the file SOCKET.CH to access the individual elements of the protocol array:

Constants for the protocol array
Constant Description
PROTINFO_ALIAS One-dimensional array holding character strings with the alias names of a protocol.
PROTINFO_CNAME The default protocol name as character string.
PROTINFO_NUMBER Numeric identifier for the protocol.

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.