Re: Server is not active?

2013-09-30 Thread wagtail
On Sunday, 29 September 2013 at 15:25:53 UTC, ollie wrote: When you instantiate your InternetAddress class, set it to the assigned IP of your server machine. It's starting to look like more of a network configuration problem and not a D.learn problem. I'd rather not pollute this forum with

Re: Server is not active?

2013-09-29 Thread ollie
On Sun, 29 Sep 2013 03:47:27 +0200, wagtail wrote: When my server and client are on the same machine,these succeed. If I try communicating with other machine via global network,it do not work. IP of my server which you say above should set to server side? When you instantiate your

Re: Server is not active?

2013-09-28 Thread wagtail
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

Re: Server is not active?

2013-09-28 Thread ollie
On Sat, 28 Sep 2013 08:42:16 +0200, wagtail wrote: I tried rewriting code with using ADDR_ANY, but do not work... Ali Çehreli posted some examples in the D.learn group earlier. He creates the socket then uses its member functions to setup the connection, but it should work either way. Try

Re: Server is not active?

2013-09-28 Thread Kapps
This is just a guess, but it is because you're setting the socket to be blocking after the call to accept? If it defaults to non-blocking, this would cause accept to return immediately, so the client connecting would fail as the server isn't currently accepting connections. Also to verify it's

Re: Server is not active?

2013-09-28 Thread wagtail
On Saturday, 28 September 2013 at 17:13:06 UTC, ollie wrote: Try something like this: auto inet = new InternetAddress(port); Oh,I'm sorry. I forgot writing I already tried above instance. The constructor for class InternetAddress will set addr to ADDR_ANY. This should work if your server

Re: Server is not active?

2013-09-28 Thread wagtail
On Saturday, 28 September 2013 at 23:25:20 UTC, Kapps wrote: This is just a guess, but it is because you're setting the socket to be blocking after the call to accept? If it defaults to non-blocking, this would cause accept to return immediately, so the client connecting would fail as the

Re: Server is not active?

2013-09-27 Thread ollie
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

Re: Server is not active?

2013-09-26 Thread Adam D. Ruppe
Can you show us any more code?

Re: Server is not active?

2013-09-26 Thread wagtail
On Friday, 27 September 2013 at 01:04:47 UTC, Adam D. Ruppe wrote: Can you show us any more code? A part of code shown below. /++ Server main() / ushort port = 9876; auto inet = new InternetAddress(0.0.0.0,port);

Re: Server is not active?

2013-09-26 Thread Adam D. Ruppe
hmm, I don't know what the problem is, the socket stuff there looks correct... will have to wait for someone else to have ideas.

Re: Server is not active?

2013-09-26 Thread wagtail
On Friday, 27 September 2013 at 01:37:38 UTC, Adam D. Ruppe wrote: hmm, I don't know what the problem is, the socket stuff there looks correct... will have to wait for someone else to have ideas. Thank you for your reply. I'll think it over again.