예제 #1
0
 public ClientApi(EventHandler BroadcastHandle, ChatForm chat, ModerateForm moderate)
 {
     Port                 = 8888;
     this.chat            = chat;
     this.moderate        = moderate;
     this.BroadcastHandle = BroadcastHandle;
     clientSocket         = new TcpClient("localhost", Port);
     threadListener       = new Thread(new ThreadStart(ListenLoop));
 }
예제 #2
0
        public Lobby()
        {
            InitializeComponent();

            UserName      = "";
            chat          = new ChatForm();
            moderate      = new ModerateForm();
            client        = new ClientApi(new EventHandler(BroadcastRefresh), chat, moderate);
            Commander.Cmd = new RequestCommand(client.SayBridge);
        }