From 0d906816f12b5f52c76284f2c4e76680c0feccdc Mon Sep 17 00:00:00 2001 From: pug <pug@wiback.org> Date: Fri, 22 Feb 2008 12:58:06 +0000 Subject: [PATCH] fixed static address in example to argv[] --- Examples/UDPClientServer/Mainpage.dox | 2 +- Examples/UDPClientServer/udpClient.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Examples/UDPClientServer/Mainpage.dox b/Examples/UDPClientServer/Mainpage.dox index b3624041..4ad28247 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 59776ecd..61a103e8 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; } } -- GitLab