public void ThreadProc() { while (true) { /* using (Socket clientSocket = socket.Accept()) { IPEndPoint clientIP = clientSocket.RemoteEndPoint as IPEndPoint; EndPoint clientEndPoint = clientSocket.RemoteEndPoint; clientSocket.ReceiveTimeout = 3000; led.Write(true); Thread.Sleep(150); led.Write(false); HandleClients hc = new HandleClients(clientSocket, led, clientIP, clientEndPoint); this.ClientHandlerThread = new Thread(new ThreadStart(hc.ThreadProc)); this.ClientHandlerThread.Start(); } */ Socket clientSocket = socket.Accept(); HandleClients hc = new HandleClients(clientSocket, led); this.ClientHandlerThread = new Thread(new ThreadStart(hc.ThreadProc)); this.ClientHandlerThread.Start(); } }
public void ThreadProc() { while (true) { /* * using (Socket clientSocket = socket.Accept()) * { * IPEndPoint clientIP = clientSocket.RemoteEndPoint as IPEndPoint; * EndPoint clientEndPoint = clientSocket.RemoteEndPoint; * clientSocket.ReceiveTimeout = 3000; * led.Write(true); * Thread.Sleep(150); * led.Write(false); * * HandleClients hc = new HandleClients(clientSocket, led, clientIP, clientEndPoint); * this.ClientHandlerThread = new Thread(new ThreadStart(hc.ThreadProc)); * this.ClientHandlerThread.Start(); * } */ Socket clientSocket = socket.Accept(); HandleClients hc = new HandleClients(clientSocket, led); this.ClientHandlerThread = new Thread(new ThreadStart(hc.ThreadProc)); this.ClientHandlerThread.Start(); } }