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)); }
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); }
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()); }