/// <summary> /// This routine is used whenever a client gets data. /// </summary> /// <param name="sender">This is the client.</param> /// <param name="phoenixClientDataReceievedEventArgs">This contains the data receieved.</param> private void PClientOnDataReceived(object sender, PhoenixClientDataReceievedEventArgs phoenixClientDataReceievedEventArgs) { // raise the event. ClientDataReceieved(this, new PhoenixServerClientDataReceievedEventArgs { Client = sender as Client.Client, Data = phoenixClientDataReceievedEventArgs.Data }); }
private void ClientOnDataReceived(object sender, PhoenixClientDataReceievedEventArgs phoenixClientDataReceievedEventArgs) { Log("got data.."); switch (phoenixClientDataReceievedEventArgs.Data[0]) { case Mercury.Constants.ResponseHeader: var resp = new Response(); resp.Initialize(phoenixClientDataReceievedEventArgs.Data); switch (resp.Resp) { case Responses.Connected: Log("sending login information"); _client.Send(new Login { ID = Properties.Settings.Default.Uid, Password = textBox1.Text }.ToByteArray()); break; } break; } }