Backport #2257 to Poco 1.9.1

This commit is contained in:
proller
2018-06-04 07:29:28 +03:00
committed by Vojtěch Erben
parent 66fafef3e4
commit bada9ed2b9
4 changed files with 13 additions and 6 deletions

View File

@@ -63,7 +63,7 @@ public:
///
/// Throws a Poco::InvalidAccessException.
void bind(const SocketAddress& address, bool reuseAddress = false);
void bind(const SocketAddress& address, bool reuseAddress = false, bool reusePort = false);
/// Bind a local address to the socket.
///
/// This is usually only done when establishing a server
@@ -72,6 +72,10 @@ public:
///
/// If reuseAddress is true, sets the SO_REUSEADDR
/// socket option.
///
/// If reusePort is true, sets the SO_REUSEPORT
/// socket option.
void listen(int backlog = 64);
/// Puts the socket into listening state.

View File

@@ -78,7 +78,7 @@ public:
/// the TCP server at the given address. Prior to opening the
/// connection the socket is set to nonblocking mode.
void bind(const SocketAddress& address, bool reuseAddress = false);
void bind(const SocketAddress& address, bool reuseAddress = false, bool reusePort = false);
/// Bind a local address to the socket.
///
/// This is usually only done when establishing a server
@@ -87,6 +87,9 @@ public:
///
/// If reuseAddress is true, sets the SO_REUSEADDR
/// socket option.
///
/// If reusePort is true, sets the SO_REUSEPORT
/// socket option.
void listen(int backlog = 64);
/// Puts the socket into listening state.