Problem: socks_connecter_t duplicates code around opening and configuring a TCP socket

Solution: use tcp_open_socket function
This commit is contained in:
Simon Giesecke
2019-02-04 07:58:56 -05:00
parent 68d520ef68
commit 2f7a450294
5 changed files with 22 additions and 42 deletions

View File

@@ -103,7 +103,7 @@ zmq::tcp_listener_t::get_socket_name (zmq::fd_t fd_,
int zmq::tcp_listener_t::create_socket (const char *addr_)
{
_s = tcp_open_socket (addr_, options, &_address);
_s = tcp_open_socket (addr_, options, true, &_address);
if (_s == retired_fd) {
return -1;
}