BrandonPotter / SimpleTCP

Straightforward .NET library to handle the repetitive tasks of spinning up and working with TCP sockets (client and server).
Apache License 2.0
365 stars 108 forks source link

SimpleTcpServer.Start() should throw exception if failed. #7

Closed aquamoth closed 8 years ago

aquamoth commented 8 years ago

As is, there is no failure if a server start() fails because one or all interfaces are already occupied.

Now only trying to start listeners on interfaces with OperationalStatus = Up. Made it optional to fail if any interface listener failed to start.

Added some debug logging.

BrandonPotter commented 8 years ago

That looks like a nice balance between best effort and optional exception. Looks like this won't cause issues for anyone who still just wants to start up on any available and not worry about failures. Good work thanks!