예제 #1
0
 public override void Received(VirtualClient virtualClient)
 {
     virtualClient.Logger.LogInfo("Authentication success");
     virtualClient.Disconnect();
     virtualClient.Encryption = false;
     virtualClient.LoginInformation.LoginKey = LoginKey;
     virtualClient.Connect(ServerEndPoint.LoginServer);
 }
예제 #2
0
        private async void connect_Click(object sender, EventArgs e)
        {
            var onlineStatus = online.Checked;

            if (onlineStatus)
            {
                _client.Disconnect();
                return;
            }
            var mac      = deviceNo.Text;
            var ip       = this.ip.Text;
            var port     = Convert.ToInt32(this.port.Text);
            var device   = new VirtualDevice(mac, showSend, showRecv, onlineChange);
            var hbSwitch = heartbeat.Checked;
            var interval = 30;

            if (!String.IsNullOrEmpty(heartBeatInterval.Text))
            {
                interval = Convert.ToInt32(heartBeatInterval.Text);
            }
            _client = new VirtualClient(ip, port, hbSwitch, interval, device);
            await _client.Start();
        }