Пример #1
0
 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));
 }
Пример #2
0
 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));
 }
Пример #3
0
 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;
     }
 }
Пример #4
0
 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;
     }
 }