123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using SuperSocket.SocketBase.Protocol;
- using SuperSocket.SocketBase;
- namespace SuperWebSocket.Protocol
- {
-
-
-
- public interface IProtocolProcessor
- {
-
-
-
-
-
-
- bool CanSendBinaryData { get; }
-
-
-
- ICloseStatusCode CloseStatusClode { get; }
-
-
-
-
-
-
- IProtocolProcessor NextProcessor { get; set; }
-
-
-
-
-
-
-
- bool Handshake(IWebSocketSession session, WebSocketReceiveFilterBase previousFilter, out IReceiveFilter<IWebSocketFragment> dataFrameReader);
-
-
-
-
-
-
-
-
- IList<ArraySegment<byte>> GetEncodedPackage(int opCode, byte[] data, int offset, int length);
-
-
-
-
-
-
- IList<ArraySegment<byte>> GetEncodedPackage(int opCode, string message);
-
-
-
-
-
- void SendMessage(IWebSocketSession session, string message);
-
-
-
-
-
-
- bool TrySendMessage(IWebSocketSession session, string message);
-
-
-
-
-
-
-
- void SendData(IWebSocketSession session, byte[] data, int offset, int length);
-
-
-
-
-
-
-
-
- bool TrySendData(IWebSocketSession session, byte[] data, int offset, int length);
-
-
-
-
-
-
- void SendCloseHandshake(IWebSocketSession session, int statusCode, string closeReason);
-
-
-
-
-
- void SendPong(IWebSocketSession session, byte[] pong);
-
-
-
-
-
- void SendPing(IWebSocketSession session, byte[] ping);
-
-
-
- int Version { get; }
-
-
-
-
-
-
-
- bool IsValidCloseCode(int code);
- }
- }
|