Skip to content
Snippets Groups Projects
Commit 0d906816 authored by pug's avatar pug
Browse files

fixed static address in example to argv[]

parent 2360bb91
No related branches found
No related tags found
No related merge requests found
......@@ -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.
......
......@@ -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;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment