summaryrefslogtreecommitdiff
path: root/telnetd.h
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2010-12-31 01:25:38 +0100
committerJon Bergli Heier <snakebite@jvnv.net>2010-12-31 01:25:38 +0100
commit0e7f2cef26bde782a5758b5e9a3dfe20f745df8f (patch)
tree736b53010218fba8134a1660c7a3ad5ef998f01c /telnetd.h
parentb439fcd1916cef267bde32f3424d8311519d3d16 (diff)
Added an echoing telnet server as a base for a telnet command interface.
Diffstat (limited to 'telnetd.h')
-rw-r--r--telnetd.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/telnetd.h b/telnetd.h
new file mode 100644
index 0000000..e6126f1
--- /dev/null
+++ b/telnetd.h
@@ -0,0 +1,19 @@
+#ifndef TELNETD_H
+#define TELNETD_H
+
+#include "telnet_connection.h"
+
+namespace telnet {
+ class Server {
+ public:
+ Server(boost::asio::io_service& io_service, const tcp::endpoint& endpoint);
+
+ private:
+ void start_accept();
+ void handle_accept(Connection::p new_connection, const boost::system::error_code& error);
+
+ tcp::acceptor acceptor_;
+ };
+};
+
+#endif