PPI: Checkin of first compiling (yet not working) version
[senf.git] / Examples / TCPClientServer / server.cc
index a3b0374..54a2040 100644 (file)
@@ -29,8 +29,8 @@
 #include <iostream>
 #include "Scheduler/Scheduler.hh"
 #include "Utils/membind.hh"
-#include "Socket/TCPSocketHandle.hh"
-#include "Socket/INetAddressing.hh"
+#include "Socket/Protocols/INet/TCPSocketHandle.hh"
+#include "Socket/Protocols/INet/INetAddressing.hh"
 
 
 class Server
@@ -38,8 +38,8 @@ class Server
     senf::TCPv4ServerSocketHandle serverSock;
 
 public:
-    Server(std::string const & host, unsigned int port)
-        : serverSock(senf::INet4Address(host, port)) {}
+    Server(senf::INet4Address const & host, unsigned int port)
+        : serverSock(senf::INet4SocketAddress(host, port)) {}
     
     void run() 
     {
@@ -75,7 +75,7 @@ private:
 int main(int argc, char const * argv[])
 {
     try {
-        Server myServer ("127.0.0.1", 4243);
+        Server myServer (senf::INet4Address::Loopback, 4243);
         myServer.run();
     }
     catch (std::exception const & ex) {
@@ -83,3 +83,14 @@ int main(int argc, char const * argv[])
     }
     return 0;
 }
+
+\f
+// Local Variables:
+// mode: c++
+// fill-column: 100
+// c-file-style: "senf"
+// indent-tabs-mode: nil
+// ispell-local-dictionary: "american"
+// compile-command: "scons -u"
+// comment-column: 40
+// End: