From ab52473a09d10e9695a95dddceb9a467572ab694 Mon Sep 17 00:00:00 2001 From: Pixel Date: Sun, 13 Nov 2011 15:55:53 -0700 Subject: Adding an opaque pointer to the generic Socket listener. --- includes/Socket.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'includes/Socket.h') diff --git a/includes/Socket.h b/includes/Socket.h index 3b29f49..c31bdd8 100644 --- a/includes/Socket.h +++ b/includes/Socket.h @@ -57,7 +57,7 @@ class Socket : public Handle { template class Listener : public Task { public: - Listener(int port, const char * local = NULL) : m_stop(false) { + Listener(int port, const char * local = NULL, void * opaque = NULL) : m_stop(false), m_opaque(opaque) { bool r = m_listener.setLocal(local, port); Assert(r); r = m_listener.listen(); @@ -79,7 +79,7 @@ class Listener : public Task { yield(); continue; } - new Worker(io); + new Worker(io, m_opaque); } } void stop() { @@ -93,6 +93,7 @@ class Listener : public Task { Events::Async m_evt; volatile bool m_stop; String m_name; + void * m_opaque; }; }; -- cgit v1.2.3