X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Examples%2FTCPClientServer%2Fserver.cc;h=54a2040c6f75f1ec4678fcb1d9fd67aae30a0c8c;hb=81ffa1c459b96dd44472bcef37e1e373934ee138;hp=99991f7f4fb4712c8fa21cf8539dd346735b62b6;hpb=52dcdfccdc3c371bc9d884935ad348755fd38e55;p=senf.git diff --git a/Examples/TCPClientServer/server.cc b/Examples/TCPClientServer/server.cc index 99991f7..54a2040 100644 --- a/Examples/TCPClientServer/server.cc +++ b/Examples/TCPClientServer/server.cc @@ -26,11 +26,11 @@ // Custom includes #include +#include #include "Scheduler/Scheduler.hh" #include "Utils/membind.hh" -#include "Socket/TCPSocketHandle.hh" -#include "Socket/INetAddressing.hh" -#include "Packets/EthernetPacket.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; } + + +// 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: