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)); }
public Lobby() { InitializeComponent(); UserName = ""; chat = new ChatForm(); moderate = new ModerateForm(); client = new ClientApi(new EventHandler(BroadcastRefresh), chat, moderate); Commander.Cmd = new RequestCommand(client.SayBridge); }