Mercurial > hg > ucis.core
diff Net/TCPStream.cs @ 105:4ba4fd48e1da
Removed old TCP socket (non)blocking code
author | Ivo Smits <Ivo@UCIS.nl> |
---|---|
date | Sat, 11 Oct 2014 14:06:11 +0200 |
parents | 4b78cc5f116b |
children | 819fb56a56ea |
line wrap: on
line diff
--- a/Net/TCPStream.cs Sat Oct 11 14:05:41 2014 +0200 +++ b/Net/TCPStream.cs Sat Oct 11 14:06:11 2014 +0200 @@ -19,7 +19,6 @@ private ulong _BytesWritten; private ulong _BytesRead; private DateTime _StartTime; - private bool _Blocking; public event EventHandler Closed; @@ -27,7 +26,6 @@ _Socket = Socket; _HasPeekByte = false; _StartTime = DateTime.Now; - _Blocking = _Socket.Blocking; } public Socket Socket { @@ -39,11 +37,8 @@ } public bool Blocking { - get { return _Blocking; } - set { - Socket.Blocking = value; - _Blocking = value; - } + get { return _Socket.Blocking; } + set { Socket.Blocking = value; } } public bool NoDelay { @@ -91,7 +86,6 @@ } catch (SocketException ex) { switch (ex.SocketErrorCode) { case SocketError.WouldBlock: - _Socket.Blocking = _Blocking; throw new TimeoutException("The receive operation would block", ex); case SocketError.TimedOut: throw new TimeoutException("The receive operation timed out", ex); @@ -212,7 +206,6 @@ } catch (SocketException ex) { switch (ex.SocketErrorCode) { case SocketError.WouldBlock: - _Socket.Blocking = _Blocking; throw new TimeoutException("The send operation would block", ex); case SocketError.TimedOut: throw new TimeoutException("The send operation timed out", ex);