mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-27 02:53:12 +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:
committed by
Simon Giesecke
parent
aec9b130f7
commit
87082557f0
@@ -74,7 +74,7 @@ void zmq::ipc_connecter_t::out_event ()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
create_engine (fd);
|
create_engine (fd, get_socket_name<ipc_address_t> (fd, socket_end_local));
|
||||||
}
|
}
|
||||||
|
|
||||||
void zmq::ipc_connecter_t::start_connecting ()
|
void zmq::ipc_connecter_t::start_connecting ()
|
||||||
|
|||||||
@@ -145,10 +145,11 @@ void zmq::stream_connecter_base_t::in_event ()
|
|||||||
out_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",
|
const endpoint_uri_pair_t endpoint_pair (local_address_, _endpoint,
|
||||||
_endpoint, endpoint_type_connect);
|
endpoint_type_connect);
|
||||||
|
|
||||||
// Create the engine object for this connection.
|
// Create the engine object for this connection.
|
||||||
stream_engine_t *engine =
|
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_);
|
void timer_event (int id_);
|
||||||
|
|
||||||
// Internal function to create the engine after connection was established.
|
// 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
|
// Internal function to add a reconnect timer
|
||||||
void add_reconnect_timer ();
|
void add_reconnect_timer ();
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ void zmq::tcp_connecter_t::out_event ()
|
|||||||
return;
|
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_)
|
void zmq::tcp_connecter_t::timer_event (int id_)
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ void zmq::tipc_connecter_t::out_event ()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
create_engine (fd);
|
create_engine (fd, get_socket_name<tipc_address_t> (fd, socket_end_local));
|
||||||
}
|
}
|
||||||
|
|
||||||
void zmq::tipc_connecter_t::start_connecting ()
|
void zmq::tipc_connecter_t::start_connecting ()
|
||||||
|
|||||||
Reference in New Issue
Block a user