예제 #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;
     }
 }