private void PrintServerStarting()
        {
            string text = "Try to use one of the following IP:\n";

            foreach (var ip in GetLocalIpAddressList())
            {
                text += ip + "\n";
            }
            LdpLog.Info(text);
            LdpLabelStatus.GetInstance().StateText = text;
        }
Ejemplo n.º 2
0
 public ServerWindow()
 {
     InitializeComponent();
     server      = LdpServer.GetInstance();
     labelStatus = LdpLabelStatus.GetInstance();
     lblConnectionStatus.DataContext = labelStatus;
     OS_SUPPORTED = LdpUtils.CheckStartupWindowsVersion(this);
     if (OS_SUPPORTED)
     {
         StartServer();
     }
 }
Ejemplo n.º 3
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;
            }
        }