mirror of
https://github.com/zeromq/libzmq.git
synced 2025-02-23 15:14:40 +01:00
Problem: stream_connecter_base_t does not set local address
Solution: pass the local address by subclasses to create_engine
This commit is contained in:
parent
aec9b130f7
commit
87082557f0
@ -74,7 +74,7 @@ void zmq::ipc_connecter_t::out_event ()
|
||||
return;
|
||||
}
|
||||
|
||||
create_engine (fd);
|
||||
create_engine (fd, get_socket_name<ipc_address_t> (fd, socket_end_local));
|
||||
}
|
||||
|
||||
void zmq::ipc_connecter_t::start_connecting ()
|
||||
|
@ -145,10 +145,11 @@ void zmq::stream_connecter_base_t::in_event ()
|
||||
out_event ();
|
||||
}
|
||||
|
||||
void zmq::stream_connecter_base_t::create_engine (fd_t fd)
|
||||
void zmq::stream_connecter_base_t::create_engine (
|
||||
fd_t fd, const std::string &local_address_)
|
||||
{
|
||||
const endpoint_uri_pair_t endpoint_pair ("TODO query local endpoint",
|
||||
_endpoint, endpoint_type_connect);
|
||||
const endpoint_uri_pair_t endpoint_pair (local_address_, _endpoint,
|
||||
endpoint_type_connect);
|
||||
|
||||
// Create the engine object for this connection.
|
||||
stream_engine_t *engine =
|
||||
|
@ -63,7 +63,7 @@ class stream_connecter_base_t : public own_t, public io_object_t
|
||||
void timer_event (int id_);
|
||||
|
||||
// Internal function to create the engine after connection was established.
|
||||
void create_engine (fd_t fd);
|
||||
void create_engine (fd_t fd, const std::string &local_address_);
|
||||
|
||||
// Internal function to add a reconnect timer
|
||||
void add_reconnect_timer ();
|
||||
|
@ -111,7 +111,7 @@ void zmq::tcp_connecter_t::out_event ()
|
||||
return;
|
||||
}
|
||||
|
||||
create_engine (fd);
|
||||
create_engine (fd, get_socket_name<tcp_address_t> (fd, socket_end_local));
|
||||
}
|
||||
|
||||
void zmq::tcp_connecter_t::timer_event (int id_)
|
||||
|
@ -76,7 +76,7 @@ void zmq::tipc_connecter_t::out_event ()
|
||||
return;
|
||||
}
|
||||
|
||||
create_engine (fd);
|
||||
create_engine (fd, get_socket_name<tipc_address_t> (fd, socket_end_local));
|
||||
}
|
||||
|
||||
void zmq::tipc_connecter_t::start_connecting ()
|
||||
|
Loading…
x
Reference in New Issue
Block a user