nxLibCloseTcpPort

Navigation:  NxLib API > C Interface > Other > NxLibRemote >

nxLibCloseTcpPort

Previous pageReturn to chapter overviewNext page

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.

Signatures

Variants throwing exceptions on errors:

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

Variants returning errors codes in an int* parameter:

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

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.

Return Value

none