WSGetAvailableLinkProtocolNames (C Function)
int WSGetAvailableLinkProtocolNames( WSENV env , char *** p , int * l )
gets a list of strings containing the names of the install link protocols from the WSTP environment env storing the strings in p and the length of the list of names in l.
Details
- WSTP currently supports the following link protocol names: SharedMemory, TCPIP, IntraProcess, Pipes, FileMap, and TCP.
- Not all link protocols are available on all platforms.
-
Platform Protocol Linux SharedMemory, TCPIP, Intraprocess, Pipes, TCP Windows SharedMemory, TCPIP, IntraProcess, FileMap, TCP OS X SharedMemory, TCPIP, IntraProcess, Pipes, TCP - WSGetAvailableLinkProtocolNames() allocates memory to store the list of protocol names that must be released by calling WSReleaseLinkProtocolNames(). If WSGetAvailableLinkProtocolNames() returns an error, do not call WSReleaseLinkProtocolNames() on the contents of p.
- WSGetAvailableLinkProtocolNames() returns 0 on success and a nonzero error code on failure.
- WSGetAvailableLinkProtocolNames() is declared in the WSTP header file wstp.h.
Examples
Basic Examples (1)
#include "wstp.h"
int main()
{
WSENV env;
char **protocolNames;
int length;
int apiResult;
env = WSInitialize((WSEnvironmentParameter)0);
if(env == (WSENV)0)
{ /* Unable to create WSTP environment */ }
apiResult = WSGetAvailableLinkProtocolNames(env, &protocolNames, &length);
if(apiResult != 0)
{ /* Unable to retrieve link protocol names */ }
/* ... */
WSReleaseLinkProtocolNames(env, protocolNames, length);
WSDeinitialize(env);
}