summaryrefslogtreecommitdiff
path: root/src/tcp_listener.hpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@fastmq.commkdir>2009-08-09 11:21:47 +0200
committerMartin Sustrik <sustrik@fastmq.commkdir>2009-08-09 11:21:47 +0200
commitbde396f1561fb5e57e6e413a40d904586e186d42 (patch)
treecbd7537c95bbc8ab8a09a17cec6533a268500264 /src/tcp_listener.hpp
parent5b5b513330e96e3e08d0c2c60d03044091976420 (diff)
fix to 3-thread synchronisation algorithm
Diffstat (limited to 'src/tcp_listener.hpp')
-rw-r--r--src/tcp_listener.hpp11
1 files changed, 9 insertions, 2 deletions
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
// <interface-name>:<port-number> 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;