When using blocking Sockets, why does Send throw an InvalidOperationException when blocking is set to false?
Thereis a known issue with setting Blocking to false on a blocking socket.There are three paradigms when programming with sockets (both managedand native) and it is strongly recommended that developers useasynchronous I/O functions as a solution to this problem. Select isvery inefficient in managed code, and the cost of the regular caseexception is also high. The three paradigms are detailed below, withthe last being the preferred method.