コード例 #1
0
        static void SendPingRequest(OpenApiMessagesFactory msgFactory, Queue writeQueue)
        {
            var _msg = msgFactory.CreatePingRequest((ulong)DateTime.Now.Ticks);

            if (isDebugIsOn)
            {
                Console.WriteLine("SendPingRequest() Message to be send:\n{0}", OpenApiMessagesPresentation.ToString(_msg));
            }
            writeQueue.Enqueue(Utils.Serialize(_msg));
        }
コード例 #2
0
        protected void btnSendPingRequest_Click(object sender, EventArgs e)
        {
            var msgFactory = new OpenApiMessagesFactory();
            var msg        = msgFactory.CreatePingRequest((ulong)DateTime.Now.Ticks);

            Transmit(msg);
            byte[] _message     = Listen(_apiSocket);
            var    protoMessage = msgFactory.GetMessage(_message);

            lblResponse.Text = OpenApiMessagesPresentation.ToString(protoMessage);
        }
コード例 #3
0
        void SendPingRequest(OpenApiMessagesFactory msgFactory, Queue writeQueue)
        {
            var _msg = msgFactory.CreatePingRequest((ulong)DateTime.Now.Ticks);

#if TRACE_PING
            if (isDebugIsOn)
            {
                Console.WriteLine("SendPingRequest() Message to be sent:\n{0}", OpenApiMessagesPresentation.ToString(_msg));
            }
#endif
            writeQueue.Enqueue(_msg.ToByteArray());
        }