/// <summary> /// Nasłuchuje czy przychodzą dane /// </summary> public void Listen() { try { listener = new Socket(listenerIpEndPoint.AddressFamily, SocketType.Stream, ProtocolType.IP); listener.Bind(listenerIpEndPoint); listener.Listen(1); Console.WriteLine("LISTENING"); Socket handler = listener.Accept(); receivedData = ReceiveData(handler); CLI.PrintReceivedMessage(receivedData); listener.Close(); } catch (Exception e) { Console.WriteLine(e.ToString()); } }
public void SendThread() { CLI.SwitchCommands(this); }