public void OnInput(object sender, IOEventArgs e) { switch (e.Object.ToString()) { case "start": StartTrolling(); break; case "stop": StopTrolling(); break; default: break; } }
public virtual void OnInput(object obj, IOEventArgs args) { if (Input != null) { Input(obj, args); } }
public virtual void OnOutput(object obj, IOEventArgs args) { if (Output != null) { Output(obj, args); } }
private void OnNetworkInput(object sender, IOEventArgs e) { if (e.Object != null) { if (e.Object.GetType().Equals(typeof(ChatPacket))) { HandleChatPacket((ChatPacket)e.Object); if (VideoSync.HostedServer != null) { if (VideoSync.HostedServer.Running) { VideoSync.HostedServer.sendAll(e.Object, e.Client); } } } else if (e.Object.GetType().Equals(typeof(MessagePacket))) { HandleMessagePacket((MessagePacket)e.Object); } } }
private void OnWatchOutput(object sender, IOEventArgs e) { }
private void OnWatchInput(object sender, IOEventArgs e) { InputWrapper(sender, e); try { if (e.Object.GetType() == typeof(TimeStampPacket)) { HandleTimeStampPacket((TimeStampPacket)e.Object); } else if (e.Object.GetType() == typeof(PlayStatePacket)) { HandlePlayStatePacket((PlayStatePacket)e.Object, null); } else if (e.Object.GetType() == typeof(JoinPacket)) { HandleJoinPacket((JoinPacket)e.Object); } else if (e.Object.GetType() == typeof(UrlPacket)) { HandleUrlPacket((UrlPacket)e.Object, e.Client); } } catch (Exception ex) { Debug.Log(ex); } }
private void OnHostOutput(object sender, IOEventArgs e) { // Not used }
private void OnHostInput(object sender, IOEventArgs e) { InputWrapper(sender, e); try { if (e.Object.GetType() == typeof(PlayStatePacket)) { //HandlePlayStatePacket((PlayStatePacket)e.Object, e.Client); } else if (e.Object.GetType() == typeof(UrlPacket)) { HandleUrlPacket((UrlPacket)e.Object, e.Client); } } catch (Exception ex) { Debug.Log(ex); } }
public virtual void OnInput(object o, IOEventArgs args) { if (InputWrapper != null) { InputWrapper(o, args); } }