From: pug Date: Fri, 22 Feb 2008 12:58:06 +0000 (+0000) Subject: fixed static address in example to argv[] X-Git-Url: http://g0dil.de/git?p=senf.git;a=commitdiff_plain;h=6819aa20fc7c7312ee4ac59def28979ed5c81f8b fixed static address in example to argv[] git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@709 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/Examples/UDPClientServer/Mainpage.dox b/Examples/UDPClientServer/Mainpage.dox index b362404..4ad2824 100644 --- a/Examples/UDPClientServer/Mainpage.dox +++ b/Examples/UDPClientServer/Mainpage.dox @@ -106,7 +106,7 @@ First a \c ::UDPv4ClientSocketHandle is created. With the function \c writeto(senf::INet4SocketAddress, string) the string s will be written to the specified - address and port, which is constructed here from a static string \c "127.0.0.1:4243". In this + address and port, which is constructed here from a static string read from the console with the format \c IP:PORT. In this example Integers from zero to ten are send to the Server socket. The exception handling is again the same as with the server application. diff --git a/Examples/UDPClientServer/udpClient.cc b/Examples/UDPClientServer/udpClient.cc index 59776ec..61a103e 100644 --- a/Examples/UDPClientServer/udpClient.cc +++ b/Examples/UDPClientServer/udpClient.cc @@ -33,7 +33,7 @@ int main(int argc, char const * argv[]) senf::UDPv4ClientSocketHandle sock; std::stringstream s; s << i; - sock.writeto(senf::INet4SocketAddress("127.0.0.1:4243"),s.str()); + sock.writeto(senf::INet4SocketAddress(argv[1]),s.str()); std::cout << i << std::endl; } }