using System; using System.Collections.Generic; using System.Linq; using System.Text; using SuperSocket.SocketBase.Command; using SuperWebSocket.Protocol; namespace SuperWebSocket.Command { /// /// The command handling Pong /// /// The type of the web socket session. class Pong : FragmentCommand where TWebSocketSession : WebSocketSession, new() { /// /// Gets the name. /// public override string Name { get { return OpCode.PongTag; } } /// /// Executes the command. /// /// The session. /// The request info. public override void ExecuteCommand(TWebSocketSession session, IWebSocketFragment requestInfo) { //Do nothing, last active time has been updated automatically var frame = requestInfo as WebSocketDataFrame; if (!CheckControlFrame(frame)) { session.Close(); return; } } } }