internal InputControls(string ipAddress, ushort port, string path) { _socketClient = new WsClient(); path = path.Replace("ws:", string.Empty); /*_socketClient.Port = port; * _socketClient.URL = string.Format("ws://{0}{1}", ipAddress, path); * _socketClient.KeepAlive = true; * * _socketClient.ConnectionCallBack = ConnectionCallBack; * _socketClient.SendCallBack = SendCallBack; * _socketClient.ReceiveCallBack = ReceiveCallBack; * _socketClient.ConnectAsync();*/ _socketClient.AutoReconnect = 0; _socketClient.ID = ipAddress; _socketClient.Connect(ipAddress + path, port); }
private void Connect() { try { if (!_isBusy) { _isBusy = true; if (onBusy != null) { onBusy(1); } } _mainClient.Connect(_ipAddress, _port); //_socketClient.ConnectAsync(); } catch (Exception e) { if (_debugMode) { ErrorLog.Exception(string.Format("LgWebOs.Display.Connect ID={0} Exeption Occured", _id), e); } } }
public void Open() { client.Connect(); }
/// <summary> /// Call this method to connect to the server /// </summary> public async void ConnectToServer() { await client.Connect(); }
public async void ConnectToServer() { System.Threading.Thread.Sleep(2000); GD.Print("Second"); await client.Connect(); }
// Start is called before the first frame update async void Start() { client = new WsClient(server); await client.Connect(); }