Reusing server address
#1
I'd like to question the wisdom of setting the address reuse option for the server (cServer.cpp, line 186 as of rev 234).

The purpose of this API is to allow multiple sockets listen on the same port, for the case when the program originally listening on that port crashes, then a new instance can listen on the same port again while the old tcp endpoint still is in the TIME_WAIT state. However, at least on Windows, this also allows multiple programs to actively listen on the same port at the very same time.

I strongly believe that MCServer should be the only application using the port, and it should end with an error message if that port is already used. Therefore I'd like to remove the Reuse option, at least from windows builds of MCS.

What do you say?

References:
SO_REUSEADDR on unix: http://www.unixguide.net/network/socketfaq/4.5.shtml
SO_REUSEADDR on Win: http://msdn.microsoft.com/en-us/library/...s.85).aspx
Reply
Thanks given by:


Messages In This Thread
Reusing server address - by xoft - 02-06-2012, 09:48 PM
RE: Reusing server address - by FakeTruth - 02-06-2012, 10:14 PM
RE: Reusing server address - by tbar - 02-07-2012, 04:23 AM
RE: Reusing server address - by xoft - 02-07-2012, 12:38 AM
RE: Reusing server address - by FakeTruth - 02-07-2012, 01:11 AM
RE: Reusing server address - by FakeTruth - 02-07-2012, 05:04 AM
RE: Reusing server address - by xoft - 02-08-2012, 06:52 AM
RE: Reusing server address - by FakeTruth - 02-08-2012, 08:56 AM
RE: Reusing server address - by xoft - 02-08-2012, 08:07 PM
RE: Reusing server address - by FakeTruth - 02-08-2012, 08:50 PM



Users browsing this thread: 1 Guest(s)