Function SocketGetProtoByName() Professional

Retrieves protocol information from a protocol name.

SocketGetProtoByName( <cProtocolName>, ;
                      [@<nError>]      ) --> aProtocolInfo|NIL
A character string containing the name of the protocol.
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.

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.


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.