summaryrefslogtreecommitdiff
path: root/src/tcp_listener.hpp
diff options
context:
space:
mode:
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;