Exemple #1
0
 public void OnInput(object sender, IOEventArgs e)
 {
     switch (e.Object.ToString())
     {
         case "start":
             StartTrolling();
             break;
         case "stop":
             StopTrolling();
             break;
         default:
             break;
     }
 }
Exemple #2
0
 public virtual void OnInput(object obj, IOEventArgs args)
 {
     if (Input != null)
     {
         Input(obj, args);
     }
 }
Exemple #3
0
 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);
                }
            }
        }
Exemple #5
0
 private void OnWatchOutput(object sender, IOEventArgs e)
 {
 }
Exemple #6
0
 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);
     }
 }
Exemple #7
0
 private void OnHostOutput(object sender, IOEventArgs e)
 {
     // Not used
 }
Exemple #8
0
 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);
     }
 }
Exemple #9
0
 public virtual void OnInput(object o, IOEventArgs args)
 {
     if (InputWrapper != null)
     {
         InputWrapper(o, args);
     }
 }