예제 #1
0
 public void Run()
 {
     while (true)
     {
         Socket clientSock = sock.Accept();
         Client client = new Client(this, clientSock);
     }
 }
예제 #2
0
파일: Room.cs 프로젝트: SSheldon/Messenger
 public void AddClient(Client client)
 {
     lock (clients)
     {
         clients.Add(client);
     }
     PostMessage(client.Username + " joined.");
 }
예제 #3
0
파일: Form1.cs 프로젝트: Fun-User/FunBox
 public MsgWindow()
 {
     server = new Server(this);
     client = new Client();
     InitializeComponent();
 }
예제 #4
0
파일: Room.cs 프로젝트: SSheldon/Messenger
 public void RemoveClient(Client client)
 {
     lock (clients)
     {
         clients.Remove(client);
     }
     PostMessage(client.Username + " left.");
 }