NxLibRemote

nxLibConnect

void nxLibConnect(NXLIBERR *result, NXLIBSTR hostname, NXLIBINT portNumber)

Connects to an NxLib instance via TCP on the specified host and port. As NxLibRemote has no own tree structure, it is necessary to connect to an NxLib instance. All tree operations such as reads and writes will then be carried out on the tree of the remote NxLib instance. The remote instance must be prepared for the connection by opening a TCP port using nxLibOpenTcpPort().

Note

This function is only available in the NxLibRemote Interface. NxLib provides the corresponding functions nxLibOpenTcpPort() and nxLibCloseTcpPort().

Parameters
  • result – The error code of the operation.

  • hostname – A string specifying a valid DNS host name or IP address.

  • portNumber – The port number on which the remote NxLib instance listens for connections.

static void nxLibConnect(std::string const &hostname, int port)

See

nxLibConnect(NXLIBERR*, NXLIBSTR, NXLIBINT)

Note

C++ only This function is an overload accessible only in C++. Instead of returning the result code as an output parameter like its C counterpart, it throws an NxLibException in case of an error.

nxLibDisconnect

void nxLibDisconnect(NXLIBERR *result)

Disconnects from the NxLib instance, if connected.

Parameters

result – The error code of the operation.

static void nxLibDisconnect()

See

nxLibDisconnect(NXLIBERR*)

Note

C++ only This function is an overload accessible only in C++. Instead of returning the result code as an output parameter like its C counterpart, it throws an NxLibException in case of an error.