X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FProtocols%2FINet%2FINetAddressing.hh;h=57efbe4752884dfaf1958f23429aaa574ded44da;hb=9cda1b12a3e68538ea8157ca96810f0423123a70;hp=929d8889d039be9c7a22358ddb0e9e4c6e7c50eb;hpb=e9db10951ae84696e2c287c22c86add276213281;p=senf.git diff --git a/Socket/Protocols/INet/INetAddressing.hh b/Socket/Protocols/INet/INetAddressing.hh index 929d888..57efbe4 100644 --- a/Socket/Protocols/INet/INetAddressing.hh +++ b/Socket/Protocols/INet/INetAddressing.hh @@ -60,6 +60,10 @@ namespace senf { public senf::comparable_safe_bool { public: + /////////////////////////////////////////////////////////////////////////// + ///\name Structors and default members + ///@{ + INet4SocketAddress(); explicit INet4SocketAddress(std::string const & addr); ///< Set address and port /**< This constructor expects a string of the form @@ -77,6 +81,13 @@ namespace senf { /**< \param[in] addr IP address \param[in] port port number */ + explicit INet4SocketAddress(unsigned port); + ///< Set port, address is set to 0.0.0.0 + /**< \param[in] port port number */ + + ///@} + /////////////////////////////////////////////////////////////////////////// + bool operator==(INet4SocketAddress const & other) const; ///< Check INet4SocketAddress for equality @@ -146,9 +157,6 @@ namespace senf { { public: /////////////////////////////////////////////////////////////////////////// - // Types - - /////////////////////////////////////////////////////////////////////////// ///\name Structors and default members ///@{ @@ -168,6 +176,10 @@ namespace senf { ///< Initialize from address and port INet6SocketAddress(INet6Address const & addr, unsigned port, std::string const & iface); ///< Initialize explicitly from given parameters + explicit INet6SocketAddress(unsigned port); + ///< Initialize from port and set to 'unspecified' addr + /**< The address is set to [::] + \param[in] port port number */ ///@} ///////////////////////////////////////////////////////////////////////////