protected override void OnMessage(MessageEventArgs e) { // Retrieve message from client string msg = e.Data; Send("Echo: " + msg); WSController_standard.um(msg); }
/// <summary> /// create WebSocket by ip and port /// </summary> /// <param name="ip"></param> /// <param name="port"></param> /// <returns></returns> public bool CreateWSServer(int port, string state) { try { if (state == "super") { wsc = new WSController_super(port, WSOutput); } else { wsc2 = new WSController_standard(port, WSOutput); } mode = state; return(true); } catch (Exception e) { MainComm(e.ToString()); return(false); } }
protected override void OnOpen() { WSController_standard.um("Arduino device has connected."); WSController_standard.SendToSession = Send; }
protected override void OnOpen() { WSController_standard.um("Android device has connected. ID: " + this.ID); WSController_standard.SendToSession = Send; }