X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Examples%2FTCPClientServer%2Fclient.cc;h=50f4ec72127baf7345341609c6a334cff28d4660;hb=834416e1c5669c1687d63e29b8055afe3b44ad63;hp=12fb87acba70d43982681a9f7a379fe952c5d0dc;hpb=fb08e3defcfb7cd8851ede0fab6cad424d168485;p=senf.git diff --git a/Examples/TCPClientServer/client.cc b/Examples/TCPClientServer/client.cc index 12fb87a..50f4ec7 100644 --- a/Examples/TCPClientServer/client.cc +++ b/Examples/TCPClientServer/client.cc @@ -1,8 +1,9 @@ // $Id$ // // Copyright (C) 2007 -// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) -// Kompetenzzentrum fuer Satelitenkommunikation (SatCom) +// Fraunhofer Institute for Open Communication Systems (FOKUS) +// Competence Center NETwork research (NET), St. Augustin, GERMANY +// Thorsten Horstmann // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -23,30 +24,29 @@ // Custom includes #include #include -#include "Socket/Protocols/INet/TCPSocketHandle.hh" -#include "Socket/Protocols/INet/INetAddressing.hh" +#include int main(int argc, char const * argv[]) { try { for (int i=0; i<=1000; i++) { senf::TCPv4ClientSocketHandle sock; - sock.connect(senf::INet4SocketAddress("127.0.0.1", 4243)); + sock.connect(senf::INet4SocketAddress("127.0.0.1:4243")); sock.protocol().linger(true); - + std::stringstream s; s << i++; sock.write(s.str()); sock.close(); - + std::cout << i << std::endl; } } catch (std::exception const & ex) { std::cerr << senf::prettyName(typeid(ex)) << ": " << ex.what() << "\n"; } - + return 0; }