This feature is not supported on the Wolfram Cloud.

unsigned short WSPortFromLinkServer(WSLinkServer s, int *err)
returns the TCPIP port number used by link server s.


  • If WSPortFromLinkServer() succeeds err will contain 0. If WSPortFromLinkServer() failes, err will contain a nonzero error code.
  • The nonzero values that indicate an error condition correspond to the WSE error codes in wstp.h and as returned by WSError().

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

#include "wstp.h"

unsigned short getPortFromLinkServer(WSLinkServer server)
    return WSPortFromLinkServer(server);