summaryrefslogtreecommitdiff
path: root/src/syncServer.h
diff options
context:
space:
mode:
authorOthmar Gsenger <otti@anytun.org>2008-10-19 20:23:49 +0000
committerOthmar Gsenger <otti@anytun.org>2008-10-19 20:23:49 +0000
commit3c66fe726ae8044b2d3ce90115217a6240473598 (patch)
treed0d2f3575d23c8262c07f35343177fd4706d95c8 /src/syncServer.h
parentmove to asio socket libary for sync (diff)
now with files
Diffstat (limited to 'src/syncServer.h')
-rw-r--r--src/syncServer.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/syncServer.h b/src/syncServer.h
new file mode 100644
index 0000000..3fde1cc
--- /dev/null
+++ b/src/syncServer.h
@@ -0,0 +1,27 @@
+#ifndef _SYNC_SERVER_H_
+#define _SYNC_SERVER_H_
+//#include <iostream>
+//#include <string>
+#include <boost/bind.hpp>
+#include <boost/shared_ptr.hpp>
+#include <boost/enable_shared_from_this.hpp>
+#include <asio.hpp>
+#include <list>
+#include "syncTcpConnection.h"
+
+//using boost::asio::ip::tcp;
+
+class SyncServer
+{
+public:
+ SyncServer(asio::io_service& io_service, asio::ip::tcp::endpoint tcp_endpoint );
+
+ std::list<SyncTcpConnection::pointer> conns_;
+private:
+ void start_accept();
+ void handle_accept(SyncTcpConnection::pointer new_connection,
+ const asio::error_code& error);
+
+ asio::ip::tcp::acceptor acceptor_;
+};
+#endif