Exemple #1
0
        void MsgCallback(UdpServerLib.UDPServer.UDP_MSGCB code,
                         AppCommon.UDP_MESSAGE_CODES msgCode,
                         byte [] buffer,
                         int size)
        {
            switch (code)
            {
            case UDPServer.UDP_MSGCB.MSG_RECIVED:
            {
                lblDate.Text   = DateTime.Now.ToString();
                lblStatus.Text = "Msg Received: ";
            }
            break;

            case UDPServer.UDP_MSGCB.DATA_RECIVED:
            {
                Func <byte[], int, int> FunctionPTR = m_callbackFunctions[msgCode];
                FunctionPTR(buffer, size);

                textBox1.AppendText(lblDate.Text + "  Sending ack" + Environment.NewLine);
                m_udpClient.Cmd.SendAck();
            }
            break;
            }
        }
Exemple #2
0
 public void Send(AppCommon.UDP_MESSAGE_CODES code, ushort[] data)
 {
 }