1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using Microsoft.Extensions.Logging;
- using SuperSocket.SocketBase;
- using SuperSocket.SocketBase.Command;
- using SuperSocket.SocketBase.Config;
- using SuperSocket.SocketBase.Protocol;
- using SuperWebSocket.Config;
- namespace SuperWebSocket.SubProtocol
- {
-
-
-
-
- public abstract class SubProtocolBase<TWebSocketSession> : ISubProtocol<TWebSocketSession>
- where TWebSocketSession : WebSocketSession<TWebSocketSession>, new()
- {
- private SubProtocolBase()
- {
- }
-
-
-
-
- public SubProtocolBase(string name)
- {
- Name = name;
- }
-
-
-
- public string Name { get; private set; }
-
-
-
-
-
-
-
- public abstract bool Initialize(IAppServer appServer, SubProtocolConfig protocolConfig, ILogger logger);
-
-
-
-
-
-
- public IRequestInfoParser<SubRequestInfo> SubRequestParser { get; protected set; }
-
-
-
-
-
-
- public abstract bool TryGetCommand(string name, out ISubCommand<TWebSocketSession> command);
- }
- }
|