public void Register(string ip, int port) { MessageGenerator generator = new MessageGenerator("REG", this.name); generator.AddReceiver(this.dispatchServerName); generator.AddReceiver(this.name); generator.AddParameter("IP", ip); generator.AddParameter("Port", port.ToString()); base.Send(generator.GetMessage()); }
private void ReturnClients(Message message) { MessageGenerator generator = new MessageGenerator("CLIENTS", this.name); generator.AddReceiver(message.Sender); foreach (DataRow row in this.clientSet.Tables["Client"].Rows) { generator.AddParameter("Client", row["Name"].ToString()); } this.Send(message.Sender, generator.GetMessage()); }