OpenersNotesSection(Spacer1)Details

MathLink currently supports the following link protocol names: SharedMemory, TCPIP, IntraProcess, Pipes, FileMap, and TCP.

Not all link protocols are available on all platforms.

MLGetAvailableLinkProtocolNames() allocates memory to store the list of protocol names that must be released by calling (NonWLLink[MLReleaseLinkProtocolNames(), paclet:/ref/c/MLReleaseLinkProtocolNames]). If MLGetAvailableLinkProtocolNames() returns an error, do not call (NonWLLink[MLReleaseLinkProtocolNames(), paclet:/ref/c/MLReleaseLinkProtocolNames]) on the contents of p.

MLGetAvailableLinkProtocolNames() returns 0 on success and a nonzero error code on failure.

MLGetAvailableLinkProtocolNames() is declared in the MathLink header file (RefLink[mathlink.h, paclet:/ref/file/mathlink.h]).

OpenersPrimaryExamplesSection(Spacer1)Examples  (1)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

#include "mathlink.h"

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

	env = MLInitialize((MLEnvironmentParameter)0);
	if(env == (MLENV)0)
	{ /* Unable to create MathLink environment */ }

	apiResult = MLGetAvailableLinkProtocolNames(env, &protocolNames, &length);
	if(apiResult != 0)
	{ /* Unable to retrieve link protocol names */ }

	/* ... */

	MLReleaseLinkProtocolNames(env, protocolNames, length);

	MLDeinitialize(env);
}

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(NonWLLink[MLOpenArgcArgv(), paclet:/ref/c/MLOpenArgcArgv])  ▪  (NonWLLink[MLOpenString(), paclet:/ref/c/MLOpenString])  ▪  (NonWLLink[MLReleaseLinkProtocolNames(), paclet:/ref/c/MLReleaseLinkProtocolNames]) }})}})