Skip to content

parse NDSSERVER environment variable for default connection host:port arguments

The NDSSERVER environment variable is in common usage for specifying host and port to applications that use nds2-client. This adds parsing of this variable directly into the C++ interface and all it's SWIG bindings, so apps can use the client without having to handle the parsing.

There is no official spec for the format of NDSSERVER, but the common usage is:

NDSSERVER=host0[:port0][,host1[:port1][,...]]

Multiple host:port pairs can be given in a comma-separated list. Here we ignore any additional hosts, and just use the first in the list (host0:port0). If the NDSSERVER variable is not set, the defaults of host="", port=31200 is used.

Merge request reports

Loading