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.

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

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
  • hostname: A string specifying a valid DNS host name or IP address.

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

nxLibDisconnect

void nxLibDisconnect(NXLIBERR *result)

Disconnects from the NxLib instance, if connected.

Parameters
  • result: The error code of the operation.

void nxLibDisconnect()

Disconnects from the NxLib instance, if connected.