@@ -69,16 +69,21 @@ class StreamPrivate;
6969class Observer
7070{
7171public:
72+ /* * The default communication port */
73+ static const unsigned short defaultPortNumber;
74+
7275 /* *
7376 * Open a new connection to the Server using environment variables.
7477 *
7578 * DEFLECT_HOST The address of the target Server instance (required).
7679 * DEFLECT_ID The identifier for the stream. If not provided, a random
7780 * unique identifier will be used.
78- * @throw std::runtime_error if DEFLECT_HOST was not provided.
81+ * @param port Port of the Server instance, default 1701.
82+ * @throw std::runtime_error if DEFLECT_HOST was not provided or no
83+ * connection to server could be established
7984 * @version 1.3
8085 */
81- DEFLECT_API Observer ();
86+ DEFLECT_API explicit Observer (unsigned short port = defaultPortNumber );
8287
8388 /* *
8489 * Open a new connection to the Server.
@@ -97,7 +102,8 @@ class Observer
97102 * "192.168.1.83". If left empty, the environment variable
98103 * DEFLECT_HOST will be used instead.
99104 * @param port Port of the Server instance, default 1701.
100- * @throw std::runtime_error if no host was provided.
105+ * @throw std::runtime_error if no host was provided or no
106+ * connection to server could be established
101107 * @version 1.0
102108 */
103109 DEFLECT_API Observer (const std::string& id, const std::string& host,
0 commit comments