From bde396f1561fb5e57e6e413a40d904586e186d42 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Sun, 9 Aug 2009 11:21:47 +0200 Subject: fix to 3-thread synchronisation algorithm --- src/tcp_listener.hpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/tcp_listener.hpp') diff --git a/src/tcp_listener.hpp b/src/tcp_listener.hpp index 43a4aa8..2a8bc23 100644 --- a/src/tcp_listener.hpp +++ b/src/tcp_listener.hpp @@ -21,6 +21,7 @@ #define __ZMQ_TCP_LISTENER_HPP_INCLUDED__ #include "fd.hpp" +#include "ip.hpp" namespace zmq { @@ -34,10 +35,13 @@ namespace zmq tcp_listener_t (); ~tcp_listener_t (); - // Open TCP listining socket. Address is in + // Set up the address to listen on. Address is in // : format. Interface name may be '*' // to bind to all the interfaces. - int open (const char *addr_); + int set_address (const char *addr_); + + // Open TCP listining socket. + int open (); // Close the listening socket. int close (); @@ -53,6 +57,9 @@ namespace zmq private: + // IP address/port to listen on. + sockaddr_in addr; + // Underlying socket. fd_t s; -- cgit v1.2.3