private void Update(object sender, EventArgs e) { if (ct.receiveMessage != null) { SetText("Server: " + ct.receiveMessage); ct.receiveMessage = null; } if (ct.IsConnected) { isWaitingForConnection = false; ct.Receive(); } else { SetText("Server: Disconnected!"); if (!isWaitingForConnection || isWaitingForConnectionCounter > IsWaitingForConnectionCounterMax) { ct.StopConnect(); ct.StartConnect(); isWaitingForConnection = true; isWaitingForConnectionCounter = 0; } } if (isWaitingForConnection) { isWaitingForConnectionCounter++; } }
private void Start() { // 39.9.131.193 // 10.40.149.114 ct = new ClientThread(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp, "127.0.0.1", 8000); ct.StartConnect(); }
private void Start() { /// 之後整合要移走: ON/OFF - line +開關條件 ct = new ClientThread(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp, "127.0.0.1", 5566); //localhost ct.StartConnect(); isSend = true; }
private void StartClient() { ct = new ClientThread(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp, "127.0.0.1", 12580); ct.StartConnect(); //isSend = true; isWaitingForConnection = true; }
private void Start() { ct = new ClientThread(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp, "192.168.208.120", 9000); ct.StartConnect(); isSend = true; var texture = new Texture2D(448, 252, TextureFormat.RGB24, false); rawImage.texture = texture; }
private void Start() { ss.a = 1; ss.b = 2; // ct = new ClientThread(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp, "127.0.0.1", 8000); ct = new ClientThread(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp, PlayerParam.ipAddress, 8000); ct.StartConnect(); isSend = true; }
private void Start() { theta_tar_a = new float[] { 0, 90, 0, 0, 0, 0, 0 }; //[Caution!] the public var should initialize here!!! ; Gripper: theta_now_a[6], 1: close; 0: open /// 之後整合要移走: ON/OFF - line +開關條件 ct = new ClientThread(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp, "127.0.0.1", 5566); //localhost ct.StartConnect(); isSend = true; ctrl_tpad_flag = false; ctrl_grip_flag = false; devider = 0; }
private void Start() { KeyName.text = "kevin"; KeyHost.text = "10.211.55.3:100"; c_btn.onClick.AddListener(delegate { SetHost(); _clientSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); ct = new ClientThread(_clientSocket, KeyName.text, remoteEP); ct.StartConnect(); ct.handlerString += ConnectFailed; }); }
private void Start() { ct = new ClientThread(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp, "163.13.201.90", 36002); ct.StartConnect(); isSend = true; }