static void serv_ClientConnected(vProto.BaseServer sender, vProto.Events.ServerClientConnectedEventArgs e) { Console.WriteLine("Client CONNECTED: {0}", e.ID); e.Client.ConnectionFailed += Client_ConnectionFailed; e.Client.Disconnected += Client_Disconnected; e.Client.RequestReceived += Client_RequestReceived; e.Client.SendFailed += Client_SendFailed; e.Client.ReceiptFailed += Client_ReceiptFailed; try { e.Client.RegisterRmiService<Common_Test_Shizzle.RMI_Interface>(new Common_Test_Shizzle.RMI_Object()); } catch(Exception x) { Console.WriteLine(x); } }
static void client_Disconnected(vProto.BaseClient sender, vProto.Events.ClientDisconnectedEventArgs e) { Console.WriteLine("Disconnected!\n{0}", e.Exception); }
static void client_AuthFailed(vProto.BaseClient sender, vProto.Events.ClientAuthFailedEventArgs e) { Console.WriteLine("SSL Auth failed..?\n{0}", e.Exception); }
static void client_ConnectionFailed(vProto.BaseClient sender, vProto.Events.ClientConnectionFailedEventArgs e) { Console.WriteLine("Connection failed..?\n{0}", e.Exception); }
static void client_SendFailed(vProto.BaseClient sender, vProto.Events.PipeFailureEventArgs e) { Console.WriteLine("Send failed!\n{0}", e.Exception); }
static void responseHandler(vProto.Request sender, vProto.BaseClient client, vProto.Events.ResponseReceivedEventArgs e) { Console.WriteLine("Response received: {0}", Encoding.UTF8.GetString(e.Payload)); }
static void Client_ConnectionFailed(vProto.BaseClient sender, vProto.Events.ClientConnectionFailedEventArgs e) { Console.WriteLine("Connection failed for {0}: {1}", sender.ID, e.CarriesException ? e.Exception.Message : "No exception."); //Console.WriteLine("Stack trace:\n{0}", Environment.StackTrace); }
static void serv_ClientDisconnected(vProto.BaseServer sender, vProto.Events.ServerClientDisconnectedEventArgs e) { Console.WriteLine("Client disconnected: {0}", e.ID); }
static void serv_ClientConnectionFailed(vProto.BaseServer sender, vProto.Events.ServerClientConnectionFailedEventArgs e) { Console.WriteLine("Connection failed: {0}", e.CarriesException ? e.Exception.Message : "No exception."); }
static void Client_Disconnected(vProto.BaseClient sender, vProto.Events.ClientDisconnectedEventArgs e) { Console.WriteLine("Client {0} DISCONNECTED", sender.ID); }
static void Client_RequestReceived(vProto.BaseClient sender, vProto.Events.RequestReceivedEventArgs e) { Console.WriteLine("Received request of {0} byes from {1}.", e.Response.RequestPayload.Length, sender.ID); e.Response.SetPayload(Encoding.UTF8.GetBytes(e.Response.RequestPayload.Length.ToString())).Send(); }
static void Client_SendFailed(vProto.BaseClient sender, vProto.Events.PipeFailureEventArgs e) { Console.WriteLine("Send failed for {0}", sender.ID); }