diff Net/TCPServer.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 3ab940a0c7a0
children 819fb56a56ea
line wrap: on
line diff
--- a/Net/TCPServer.cs	Sat Oct 11 14:05:41 2014 +0200
+++ b/Net/TCPServer.cs	Sat Oct 11 14:06:11 2014 +0200
@@ -88,7 +88,6 @@
 
 			_Listener = new Socket(af, SocketType.Stream, ProtocolType.Tcp);
 
-			_Listener.Blocking = false;
 			_Listener.Bind(new IPEndPoint(af == AddressFamily.InterNetworkV6 ? IPAddress.IPv6Any : IPAddress.Any, Port));
 			_Listener.Listen(25);
 			_ThrottleCounter = _ThrottleBurst;
@@ -184,7 +183,6 @@
 
 			internal Client(Socket Socket, TCPServer Server) : base(Socket) {
 				_Server = Server;
-				Socket.Blocking = true;
 				base.Closed += _Stream_Closed;
 				this.Tag = Server;
 			}
@@ -197,11 +195,8 @@
 				bool CloseSocket = true;
 				try {
 					try {
-						base.Blocking = true;
 						//base.NoDelay = true;
 						base.ReadTimeout = 5000;
-						base.WriteBufferSize = 1024 * 10;
-						base.ReadBufferSize = 1024 * 10;
 						//Console.WriteLine("TCPServer: Accepted connection from " + base.Socket.RemoteEndPoint.ToString());
 						_MagicNumber = (byte)base.PeekByte();
 					} catch (TimeoutException ex) {