On Saturday, 28 September 2013 at 05:28:05 UTC, ollie wrote:
On Fri, 27 Sep 2013 03:22:32 +0200, wagtail wrote:
A part of code shown below.
/++++++++++++++++++++++++++ Server main()
++++++++++++++++++++++++++++++++/
ushort port = 9876;
auto inet = new InternetAddress("0.0.0.0",port);
Socket server = new TcpSocket(inet.addressFamily());
bool flag = true;
server.bind(inet);
server.listen(255);
Is there any particular reason to use "0.0.0.0" creating your
InternetAddress? I think it should be the ip of your server
or just send port and ADDR_ANY will be used.
From Wikipedia:
In the Internet Protocol version 4 the address 0.0.0.0 is a
non-routable
meta-address used to designate an invalid, unknown or non
applicable
target.
Thank you for your reply!
I thought ADDR_ANY is the same as "0.0.0.0",so I used it.
This Server doesn't know ip of opponent client.
I tried rewriting code with using "ADDR_ANY", but do not work...