Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
 static void client_Disconnected(vProto.BaseClient sender, vProto.Events.ClientDisconnectedEventArgs e)
 {
     Console.WriteLine("Disconnected!\n{0}", e.Exception);
 }
Exemplo n.º 3
0
 static void client_AuthFailed(vProto.BaseClient sender, vProto.Events.ClientAuthFailedEventArgs e)
 {
     Console.WriteLine("SSL Auth failed..?\n{0}", e.Exception);
 }
Exemplo n.º 4
0
 static void client_ConnectionFailed(vProto.BaseClient sender, vProto.Events.ClientConnectionFailedEventArgs e)
 {
     Console.WriteLine("Connection failed..?\n{0}", e.Exception);
 }
Exemplo n.º 5
0
 static void client_SendFailed(vProto.BaseClient sender, vProto.Events.PipeFailureEventArgs e)
 {
     Console.WriteLine("Send failed!\n{0}", e.Exception);
 }
Exemplo n.º 6
0
 static void responseHandler(vProto.Request sender, vProto.BaseClient client, vProto.Events.ResponseReceivedEventArgs e)
 {
     Console.WriteLine("Response received: {0}", Encoding.UTF8.GetString(e.Payload));
 }
Exemplo n.º 7
0
        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);
        }
Exemplo n.º 8
0
 static void serv_ClientDisconnected(vProto.BaseServer sender, vProto.Events.ServerClientDisconnectedEventArgs e)
 {
     Console.WriteLine("Client disconnected: {0}", e.ID);
 }
Exemplo n.º 9
0
 static void serv_ClientConnectionFailed(vProto.BaseServer sender, vProto.Events.ServerClientConnectionFailedEventArgs e)
 {
     Console.WriteLine("Connection failed: {0}", e.CarriesException ? e.Exception.Message : "No exception.");
 }
Exemplo n.º 10
0
 static void Client_Disconnected(vProto.BaseClient sender, vProto.Events.ClientDisconnectedEventArgs e)
 {
     Console.WriteLine("Client {0} DISCONNECTED", sender.ID);
 }
Exemplo n.º 11
0
        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();
        }
Exemplo n.º 12
0
 static void Client_SendFailed(vProto.BaseClient sender, vProto.Events.PipeFailureEventArgs e)
 {
     Console.WriteLine("Send failed for {0}", sender.ID);
 }