WSGetAvailableLinkProtocolNames()
This feature is not supported on the Wolfram Cloud.

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.

DetailsDetails

  • WSTP currently supports the following link protocol names: SharedMemory, TCPIP, IntraProcess, Pipes, FileMap, and TCP.
  • Not all link protocols are available on all platforms.
  • PlatformProtocol
    LinuxSharedMemory, TCPIP, Intraprocess, Pipes, TCP
    WindowsSharedMemory, TCPIP, IntraProcess, FileMap, TCP
    OS XSharedMemory, 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 WSReleaseProtocolNames() 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.

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

#include "wstp.h"

int main()
{
    MLENV env;
    char **protocolNames;
    int length;
    int apiResult;

    env = WSInitialize((WSEnvironmentParameter)0);
    if(env == (MLENV)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);
}