Example #1
0
 /// <summary>
 /// raises our input receive event safely
 /// </summary>
 /// <param name="connectionArgs">The connection arg</param>
 /// <param name="action">The text that was received</param>
 private void RaiseInputReceived(ConnectionArgs connectionArgs, String action)
 {
     if (InputReceived != null)
     {
         InputReceived(this, connectionArgs, action);
     }
 }
Example #2
0
 /// <summary>The event handler for the 'data received' event.</summary>
 /// <param name="sender">The connection that originated this event.</param>
 /// <param name="args">The connection arguments for this event.</param>
 private void EventHandlerDataReceived(object sender, ConnectionArgs args)
 {
     if (DataReceived != null)
     {
         DataReceived(sender, args);
     }
 }
Example #3
0
 /// <summary>The event handler for the 'data sent' event.</summary>
 /// <param name="sender">The connection that originated this event.</param>
 /// <param name="args">The connection arguments for this event.</param>
 private void EventHandlerDataSent(object sender, ConnectionArgs args)
 {
     if (DataSent != null)
     {
         DataSent(sender, args);
     }
 }
Example #4
0
 /// <summary>This is called when the base server receives data.</summary>
 /// <param name="sender">The sender of this event.</param>
 /// <param name="args">The event arguments.</param>
 private void BaseServer_OnDataReceived(object sender, ConnectionArgs args)
 {
     ProcessIncomingData(args.Connection, args.Connection.Data);
 }
Example #5
0
        /// <summary>The event handler for the 'client disconnected' event.</summary>
        /// <param name="sender">The connection that originated this event.</param>
        /// <param name="args">The connection arguments for this event.</param>
        private void EventHandlerClientDisconnected(object sender, ConnectionArgs args)
        {
            lock (LockObject)
            {
                connections.Remove(args.Connection);
            }

            if (ClientDisconnected != null)
            {
                ClientDisconnected(this, args);
            }
        }
Example #6
0
 /// <summary>This is called when a client connects to the base server.</summary>
 /// <param name="sender">The sender of this event.</param>
 /// <param name="args">The event arguments.</param>
 private void BaseServer_OnClientConnect(object sender, ConnectionArgs args)
 {
     // We send the connection to our session manager to deal with.
     UpdateSubSystemHost((ISubSystem)sender, args.Connection.ID + " - Connected");
     SessionManager.Instance.OnSessionConnected(args.Connection);
 }
Example #7
0
        /// <summary>This is called when a client disconnects from the base server.</summary>
        /// <param name="sender">The sender of this event.</param>
        /// <param name="args">The event arguments.</param>
        private void BaseServer_OnClientDisconnected(object sender, ConnectionArgs args)
        {
            SessionManager.Instance.OnSessionDisconnected(args.Connection);

            UpdateSubSystemHost((ISubSystem)sender, args.Connection.ID + " - Disconnected");
        }
Example #8
0
 /// <summary>This is called when the base server sent data.</summary>
 /// <param name="sender">The sender of this event.</param>
 /// <param name="args">The event arguments.</param>
 private static void BaseServer_OnDataSent(object sender, ConnectionArgs args)
 {
 }
Example #9
0
 /// <summary>This is called when we receive input on a connection.</summary>
 /// <param name="sender">The sender of this event.</param>
 /// <param name="args">The event arguments.</param>
 /// <param name="input">The input received.</param>
 private void CommandServer_OnInputReceived(object sender, ConnectionArgs args, string input)
 {
     // We send the data received onto our session manager to deal with the input.
     SessionManager.Instance.OnInputReceived(args.Connection, input);
 }
Example #10
0
 /// <summary>
 /// This is called when we receive input on a connection.
 /// </summary>
 /// <param name="sender">The sender of this event.</param>
 /// <param name="args">The event arguments.</param>
 /// <param name="input">The input received.</param>
 private void CommandServer_OnInputReceived(object sender, ConnectionArgs args, string input)
 {
     // We send the data received onto our session manager to deal with the input.
     SessionManager.Instance.OnInputReceived(args.Connection, input);
 }
Example #11
0
 /// <summary>
 /// This is called when the base server receives data.
 /// </summary>
 /// <param name="sender">The sender of this event.</param>
 /// <param name="args">The event arguments.</param>
 private void BaseServer_OnDataReceived(object sender, ConnectionArgs args)
 {
     this.ProcessIncomingData(args.Connection, args.Connection.Data);
 }
Example #12
0
        /// <summary>
        /// This is called when a client disconnects from the base server.
        /// </summary>
        /// <param name="sender">The sender of this event.</param>
        /// <param name="args">The event arguments.</param>
        private void BaseServer_OnClientDisconnected(object sender, ConnectionArgs args)
        {
            SessionManager.Instance.OnSessionDisconnected(args.Connection);

            this.UpdateSubSystemHost((ISubSystem)sender, args.Connection.ID + " - Disconnected");
        }
Example #13
0
 /// <summary>
 /// This is called when a client connects to the base server.
 /// </summary>
 /// <param name="sender">The sender of this event.</param>
 /// <param name="args">The event arguments.</param>
 private void BaseServer_OnClientConnect(object sender, ConnectionArgs args)
 {
     // We send the connection to our session manager to deal with.
     this.UpdateSubSystemHost((ISubSystem)sender, args.Connection.ID + " - Connected");
     SessionManager.Instance.OnSessionConnected(args.Connection);
 }
Example #14
0
 /// <summary>
 /// This is called when the base server sent data.
 /// </summary>
 /// <param name="sender">The sender of this event.</param>
 /// <param name="args">The event arguments.</param>
 private static void BaseServer_OnDataSent(object sender, ConnectionArgs args)
 {
 }