+ if (socket.Blocking) {
+ total=socket.Receive(buffer, offset,
+ size, sockflags);
+ End();
+ return;
+ }
+
+ SocketException rethrow = null;
+ try {
+ total = socket.Receive (buffer, offset, size, sockflags);
+ } catch (SocketException e) {
+ //WSAEWOULDBLOCK
+ if (e.NativeErrorCode != 10035)
+ throw;
+
+ socket.Poll (-1, SelectMode.SelectRead);
+ try {
+ total = socket.Receive (buffer, offset, size, sockflags);
+ } catch (SocketException e2) {
+ rethrow = e2;
+ }
+ }
+ End ();
+ if (rethrow != null)
+ throw rethrow;