public Client(string serverIP) { ReceivedACK = false; remotePoint = new IPEndPoint(IPAddress.Any, 0); hostPoint = new IPEndPoint(IPAddress.Parse(serverIP), Server.SERVER_LISTENING_PORT); client = new MyUdpClient(); userList = new UserCollection(); listenThread = new Thread(new ThreadStart(Run)); }
public void Start() { try { server = new MyUdpClient(SERVER_LISTENING_PORT); serverThread.Start(); Console.WriteLine("P2P Server started, waiting client connect..."); } catch (Exception exp) { Console.WriteLine("Start P2P Server error: " + exp.Message); throw exp; } }