예제 #1
0
        static void Main(string[] args)
        {
            var t = new ProtoBufSocket();

            t.ReceiveMessage += ReceiveMessage;
            t.Connect();
            t.SendMessage(BuildObject());

            string cmd;

            do
            {
                cmd = Console.ReadLine();
                if (cmd == "A")
                {
                    t.SendMessage(BuildObject("A"));
                }
            } while (cmd != null && cmd.ToLower() != "q");

            t.Disconnect();
        }
 public BusinessChannelHandler(ProtoBufSocket protoBufSocket, ReceiveMessageEvent receiveMessageEvent)
 {
     ReceiveMessageEvent = receiveMessageEvent;
     this.protoBufSocket = protoBufSocket;
 }