summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2011-11-13 15:55:53 -0700
committerPixel <pixel@nobis-crew.org>2011-11-13 15:55:53 -0700
commitab52473a09d10e9695a95dddceb9a467572ab694 (patch)
treee4a58979cf844c4936ea575e7eccf8992872411a /includes
parentb3b38455482f2d15f07a33ecf00f9dea113e7968 (diff)
Adding an opaque pointer to the generic Socket listener.
Diffstat (limited to 'includes')
-rw-r--r--includes/Socket.h5
1 files changed, 3 insertions, 2 deletions
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 Worker>
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;
};
};