/// <summary> /// Requests data from the server. /// Clarification regarding the title, it refers to the fact the command is being recieved by the server from the client. /// </summary> /// <param name="sender">The object requesting the data (should usually just by "this").</param> /// <param name="args">The request being sent.</param> public void CommandRecieved(object sender, CommandRecievedEventArgs args) { if (args.Args != null && String.Equals(args.Args[0], "close")) { ClientAlive = false; } Message = CommandRecievedEventArgs.CommandRecievedToJSON(args); MessagePending = true; }