]> git.sesse.net Git - cubemap/blobdiff - acceptor.h
Move stopping into ServerPool.
[cubemap] / acceptor.h
index f173e5b647e68d9c4d8cad2ac64e99b7c4523dd0..97672338a133b0006b9203a8e33903057dd0aa33 100644 (file)
@@ -1,10 +1,20 @@
 #ifndef _ACCEPTOR_H
 #define _ACCEPTOR_H
 
+#include "thread.h"
+
 int create_server_socket(int port);
 
 // A thread that accepts new connections on a given socket,
 // and hands them off to the server pool.
-void *acceptor_thread_run(void *arg);
+class AcceptorThread : public Thread {
+public:
+       AcceptorThread(int server_sock);
+
+private:
+       virtual void do_work();
+
+       int server_sock;
+};
 
 #endif  // !defined(_ACCEPTOR_H)