using System; using System.Collections.Generic; using System.Linq; using System.Text; using SuperSocket.SocketBase.Command; using SuperWebSocket.Protocol; namespace SuperWebSocket.Command { /// /// The command to handling text message in plain text of hybi00 /// /// The type of the web socket session. class Plain : CommandBase where TWebSocketSession : WebSocketSession, new() { /// /// Gets the name. /// public override string Name { get { return OpCode.PlainTag; } } /// /// Executes the command. /// /// The session. /// The request info. public override void ExecuteCommand(TWebSocketSession session, IWebSocketFragment requestInfo) { var plainFragment = requestInfo as PlainFragment; session.AppServer.OnNewMessageReceived(session, plainFragment.Message); } } }