0

I wrote a simple TCP server. Right now I just swallow all exceptions in try/catch block for ClientAccept or Socket's Accept. Both of these throw either IOException or SocketException and the later redirects to Win32 Socket Errors Codes for more info.

My question is this: are all these error considered fatal to TCP connection I have saved and I should drop it? Or some of them can be ignored? Is there some writeup with a list which is which?

KreonZZ
  • 175
  • 2
  • 10
  • "I wrote a simple TCP server" - why? if you just want to make computers communicate there are a bunch of libraries and protocols that are much easier to use. If you use raw TCP you need to deal with things like message framing and errors yourself. Stephen Cleary has an [article about TCP](https://blog.stephencleary.com/2009/04/tcpip-net-sockets-faq.html) going thru some of the things you need to care about. – JonasH Jan 18 '23 at 13:17

0 Answers0