Add the outgoing_bind option

Lets the admin choose a local address to bind each outgoing (IRC) socket.
This commit is contained in:
Florent Le Coz
2015-12-01 16:08:40 +01:00
parent 6dcb21a032
commit 241768836d
4 changed files with 46 additions and 0 deletions
@@ -224,6 +224,12 @@ protected:
bool hostname_resolution_failed;
/**
* Address to bind the socket to, before calling connect().
* If empty, it’s equivalent to binding to INADDR_ANY.
*/
std::string bind_addr;
private:
TCPSocketHandler(const TCPSocketHandler&) = delete;
TCPSocketHandler(TCPSocketHandler&&) = delete;