socket would block error c#

C#
catch (SocketException e)
{
  if (e.SocketErrorCode != SocketError.WouldBlock)
    throw;
}
Source

Also in C#: