예제 #1
0
 public void TransData(SocketModel s, string str)
 {
     if (CurrentPlayer == s.GetRemoteEndpoint())
     {
         data = str;
     }
 }
예제 #2
0
        public SocketModel Accept()
        {
            int         status = -1;
            Socket      s      = tcp.SetUpANewConnection(ref status);
            SocketModel player = new SocketModel(s);
            //Room.Add(player);
            //socketList[currentClient] = new SocketModel(s);
            //string str = socketList[currentClient].GetRemoteEndpoint();
            string str  = player.GetRemoteEndpoint();
            string str1 = "New connection from: " + str + "\n";

            textBox3.AppendText(str1);
            return(player);
        }