public void Handle(LdpPacket packet)
        {
            switch (packet.Type)
            {
                case PacketType.CLIENT_INFO_REQUEST:
                    var clientInfo = packet.ClientInfoRequest;
                    LdpClientInfo.IP = serverHandler.GetClientIPAddress;
                    LdpClientInfo.OS = clientInfo.OS;
                    LdpClientInfo.DEVICE_NAME = clientInfo.DeviceName;
                    lblText.AppendLine("Client connected:");
                    lblText.AppendLine("IP: " + LdpClientInfo.IP);
                    lblText.AppendLine("Device: " + LdpClientInfo.DEVICE_NAME);
                    lblText.AppendLine("OS: " + LdpClientInfo.OS);

                    LdpLabelStatus.GetInstance().StateText = lblText.ToString();

                    preparableRequestHandler = new LdpPreparableInfoRequestHandler();
                    serverHandler.GetListenerChannel.RemoveListener(this);
                    break;
            }
        }
Exemple #2
0
        public void Handle(LdpPacket packet)
        {
            switch (packet.Type)
            {
            case PacketType.CLIENT_INFO_REQUEST:
                var clientInfo = packet.ClientInfoRequest;
                LdpClientInfo.IP          = serverHandler.GetClientIPAddress;
                LdpClientInfo.OS          = clientInfo.OS;
                LdpClientInfo.DEVICE_NAME = clientInfo.DeviceName;
                lblText.AppendLine("Client connected:");
                lblText.AppendLine("IP: " + LdpClientInfo.IP);
                lblText.AppendLine("Device: " + LdpClientInfo.DEVICE_NAME);
                lblText.AppendLine("OS: " + LdpClientInfo.OS);

                LdpLabelStatus.GetInstance().StateText = lblText.ToString();

                preparableRequestHandler = new LdpPreparableInfoRequestHandler();
                serverHandler.GetListenerChannel.RemoveListener(this);
                break;
            }
        }