Public Types | |
typedef unsigned long | DataLength |
typedef unsigned short | UserDataIndex |
Public Member Functions | |
virtual void | StartMessage (MessageType type, __int64 messageSize, JetByteTools::IO::CSmartBuffer &buffer)=0 |
virtual void | StartFragmentedMessage (MessageType type, __int64 fragmentSize, JetByteTools::IO::CSmartBuffer &buffer)=0 |
virtual void | StartNewFragment (__int64 fragmentSize, JetByteTools::IO::CSmartBuffer &buffer, bool finalFragment=false)=0 |
virtual bool | TryStartMessage (MessageType type, __int64 messageSize, JetByteTools::IO::CSmartBuffer &buffer)=0 |
virtual bool | TryStartFragmentedMessage (MessageType type, __int64 fragmentSize, JetByteTools::IO::CSmartBuffer &buffer)=0 |
virtual bool | TryStartNewFragment (__int64 fragmentSize, JetByteTools::IO::CSmartBuffer &buffer, bool finalFragment=false)=0 |
virtual void | SendMessageData (JetByteTools::IO::CSmartBuffer &buffer)=0 |
virtual bool | TrySendMessageData (JetByteTools::IO::CSmartBuffer &buffer)=0 |
virtual void | WriteBinary (JetByteTools::IO::CSmartBuffer &buffer)=0 |
virtual void | WriteBinary (const BYTE *pData, DataLength dataLength)=0 |
virtual bool | TryWriteBinary (JetByteTools::IO::CSmartBuffer &buffer)=0 |
virtual bool | TryWriteBinary (const BYTE *pData, DataLength dataLength)=0 |
virtual bool | Close (WORD statusCode)=0 |
virtual bool | Close (WORD statusCode, const JetByteTools::Core::_tstring &reason)=0 |
virtual bool | Ping (const BYTE *pData, BYTE dataLength)=0 |
virtual bool | Pong (const BYTE *pData, BYTE dataLength)=0 |
virtual const std::string & | GetIdentifierA () const =0 |
virtual JetByteTools::Core::_tstring | GetIdentifier () const =0 |
virtual bool | TryRead ()=0 |
Attempts to read from the connection. Returns false if the connection is closed. | |
virtual bool | TryRead (JetByteTools::IO::CSmartBuffer &buffer)=0 |
Attempts to read from the connection. Returns false if the connection is closed. Note that this CAN throw an exception if the supplied buffer doesn't have any space left in it. | |
virtual bool | TryRead (JetByteTools::IO::IBuffer *pBuffer)=0 |
Attempts to read from the connection. Returns false if the connection is closed. Note that this CAN throw an exception if the supplied buffer doesn't have any space left in it. | |
virtual void | Read ()=0 |
virtual void | Read (JetByteTools::IO::CSmartBuffer &buffer)=0 |
virtual void | Read (JetByteTools::IO::IBuffer *pBuffer)=0 |
virtual void | WriteText (JetByteTools::IO::CSmartBuffer &buffer)=0 |
virtual void | WriteText (const JetByteTools::Core::_tstring &text)=0 |
virtual void | WriteText (const TCHAR *pData, DataLength dataLength)=0 |
virtual void | WriteText (const BYTE *pUTF8Data, DataLength dataLength)=0 |
virtual bool | TryWriteText (JetByteTools::IO::CSmartBuffer &buffer)=0 |
virtual bool | TryWriteText (const JetByteTools::Core::_tstring &text)=0 |
virtual bool | TryWriteText (const TCHAR *pData, DataLength dataLength)=0 |
virtual bool | TryWriteText (const BYTE *pUTF8Data, DataLength dataLength)=0 |
virtual bool | Close ()=0 |
virtual bool | AbortConnection ()=0 |
virtual JetByteTools::Socket::CAddress | GetLocalAddress () const =0 |
virtual JetByteTools::Socket::CAddress | GetRemoteAddress () const =0 |
virtual void | AddRef ()=0 |
virtual void | Release ()=0 |
virtual void * | GetUserPointer (UserDataIndex index) const =0 |
Access the data stored at the specified index as a void pointer. | |
virtual void | SetUserPointer (UserDataIndex index, void *pData)=0 |
Update the data stored at the specified index as a void pointer. | |
virtual ULONG_PTR | GetUserData (UserDataIndex index) const =0 |
Access the data stored at the specified index as an unsigned long. | |
virtual void | SetUserData (UserDataIndex index, ULONG_PTR data)=0 |
Update the data stored at the specified index as an unsigned long. | |
CSmartBuffer | Allocate () override=0 |
Allocate an instance of IBuffer, remember to call Release() on it when you're done with it. | |
virtual CSmartBuffer | Allocate (IAllocateBuffer &allocator)=0 |
CSmartBuffer | AllocateCustomSizedBuffer (IBuffer::BufferSize bufferSize) override=0 |
virtual CSmartBuffer | AllocateCustomSizedBuffer (IAllocateBuffer &allocator, IBuffer::BufferSize bufferSize)=0 |
virtual void | AddBufferToPool (IBuffer &buffer)=0 |
Static Public Attributes | |
static JETBYTE_CONSTEXPR UserDataIndex | InvalidUserDataIndex = 0xFFFF |
Protected Member Functions | |
virtual | ~IWebSocket () |
typedef unsigned long DataLength [inherited] |
Reimplemented in TWebSocketBase< JetByteTools::WebSocket::HyBi::IWebSocket >.
typedef unsigned short UserDataIndex [inherited] |
virtual ~IWebSocket | ( | ) | [protected, virtual] |
Reimplemented from IWebSocket.
virtual void StartMessage | ( | MessageType | type, | |
__int64 | messageSize, | |||
JetByteTools::IO::CSmartBuffer & | buffer | |||
) | [pure virtual] |
virtual void StartFragmentedMessage | ( | MessageType | type, | |
__int64 | fragmentSize, | |||
JetByteTools::IO::CSmartBuffer & | buffer | |||
) | [pure virtual] |
virtual void StartNewFragment | ( | __int64 | fragmentSize, | |
JetByteTools::IO::CSmartBuffer & | buffer, | |||
bool | finalFragment = false | |||
) | [pure virtual] |
virtual bool TryStartMessage | ( | MessageType | type, | |
__int64 | messageSize, | |||
JetByteTools::IO::CSmartBuffer & | buffer | |||
) | [pure virtual] |
virtual bool TryStartFragmentedMessage | ( | MessageType | type, | |
__int64 | fragmentSize, | |||
JetByteTools::IO::CSmartBuffer & | buffer | |||
) | [pure virtual] |
virtual bool TryStartNewFragment | ( | __int64 | fragmentSize, | |
JetByteTools::IO::CSmartBuffer & | buffer, | |||
bool | finalFragment = false | |||
) | [pure virtual] |
virtual void SendMessageData | ( | JetByteTools::IO::CSmartBuffer & | buffer | ) | [pure virtual] |
virtual bool TrySendMessageData | ( | JetByteTools::IO::CSmartBuffer & | buffer | ) | [pure virtual] |
virtual void WriteBinary | ( | JetByteTools::IO::CSmartBuffer & | buffer | ) | [pure virtual] |
virtual void WriteBinary | ( | const BYTE * | pData, | |
DataLength | dataLength | |||
) | [pure virtual] |
virtual bool TryWriteBinary | ( | JetByteTools::IO::CSmartBuffer & | buffer | ) | [pure virtual] |
virtual bool TryWriteBinary | ( | const BYTE * | pData, | |
DataLength | dataLength | |||
) | [pure virtual] |
virtual bool Close | ( | WORD | statusCode, | |
const JetByteTools::Core::_tstring & | reason | |||
) | [pure virtual] |
virtual const std::string& GetIdentifierA | ( | ) | const [pure virtual, inherited] |
Implemented in TWebSocketBase< JetByteTools::WebSocket::HyBi::IWebSocket >.
virtual JetByteTools::Core::_tstring GetIdentifier | ( | ) | const [pure virtual, inherited] |
Implemented in TWebSocketBase< JetByteTools::WebSocket::HyBi::IWebSocket >.
virtual bool TryRead | ( | ) | [pure virtual, inherited] |
Attempts to read from the connection. Returns false if the connection is closed.
Implemented in TWebSocketBase< JetByteTools::WebSocket::HyBi::IWebSocket >.
virtual bool TryRead | ( | JetByteTools::IO::CSmartBuffer & | buffer | ) | [pure virtual, inherited] |
Attempts to read from the connection. Returns false if the connection is closed. Note that this CAN throw an exception if the supplied buffer doesn't have any space left in it.
Implemented in TWebSocketBase< JetByteTools::WebSocket::HyBi::IWebSocket >.
virtual bool TryRead | ( | JetByteTools::IO::IBuffer * | pBuffer | ) | [pure virtual, inherited] |
Attempts to read from the connection. Returns false if the connection is closed. Note that this CAN throw an exception if the supplied buffer doesn't have any space left in it.
Implemented in TWebSocketBase< JetByteTools::WebSocket::HyBi::IWebSocket >.
virtual void Read | ( | ) | [pure virtual, inherited] |
Implemented in TWebSocketBase< JetByteTools::WebSocket::HyBi::IWebSocket >.
virtual void Read | ( | JetByteTools::IO::CSmartBuffer & | buffer | ) | [pure virtual, inherited] |
Implemented in TWebSocketBase< JetByteTools::WebSocket::HyBi::IWebSocket >.
virtual void Read | ( | JetByteTools::IO::IBuffer * | pBuffer | ) | [pure virtual, inherited] |
Implemented in TWebSocketBase< JetByteTools::WebSocket::HyBi::IWebSocket >.
virtual void WriteText | ( | JetByteTools::IO::CSmartBuffer & | buffer | ) | [pure virtual, inherited] |
Implemented in TWebSocketBase< JetByteTools::WebSocket::HyBi::IWebSocket >.
virtual void WriteText | ( | const JetByteTools::Core::_tstring & | text | ) | [pure virtual, inherited] |
Implemented in TWebSocketBase< JetByteTools::WebSocket::HyBi::IWebSocket >.
virtual void WriteText | ( | const TCHAR * | pData, | |
DataLength | dataLength | |||
) | [pure virtual, inherited] |
virtual void WriteText | ( | const BYTE * | pUTF8Data, | |
DataLength | dataLength | |||
) | [pure virtual, inherited] |
virtual bool TryWriteText | ( | JetByteTools::IO::CSmartBuffer & | buffer | ) | [pure virtual, inherited] |
Implemented in TWebSocketBase< JetByteTools::WebSocket::HyBi::IWebSocket >.
virtual bool TryWriteText | ( | const JetByteTools::Core::_tstring & | text | ) | [pure virtual, inherited] |
Implemented in TWebSocketBase< JetByteTools::WebSocket::HyBi::IWebSocket >.
virtual bool TryWriteText | ( | const TCHAR * | pData, | |
DataLength | dataLength | |||
) | [pure virtual, inherited] |
virtual bool TryWriteText | ( | const BYTE * | pUTF8Data, | |
DataLength | dataLength | |||
) | [pure virtual, inherited] |
virtual bool Close | ( | ) | [pure virtual, inherited] |
virtual bool AbortConnection | ( | ) | [pure virtual, inherited] |
Implemented in TWebSocketBase< JetByteTools::WebSocket::HyBi::IWebSocket >.
virtual JetByteTools::Socket::CAddress GetLocalAddress | ( | ) | const [pure virtual, inherited] |
Implemented in TWebSocketBase< JetByteTools::WebSocket::HyBi::IWebSocket >.
virtual JetByteTools::Socket::CAddress GetRemoteAddress | ( | ) | const [pure virtual, inherited] |
Implemented in TWebSocketBase< JetByteTools::WebSocket::HyBi::IWebSocket >.
virtual void AddRef | ( | ) | [pure virtual, inherited] |
Implemented in TWebSocketBase< JetByteTools::WebSocket::HyBi::IWebSocket >.
virtual void Release | ( | ) | [pure virtual, inherited] |
Implemented in TWebSocketBase< JetByteTools::WebSocket::HyBi::IWebSocket >.
virtual void* GetUserPointer | ( | UserDataIndex | index | ) | const [pure virtual, inherited] |
Access the data stored at the specified index as a void pointer.
Implemented in TAsyncSocket< JetByteTools::Socket::IPoolableStreamSocket, JetByteTools::Socket::IStreamSocketConnectionManager, JetByteTools::Socket::IStreamSocketCallback >, TAsyncSocket< JetByteTools::Socket::TMulticastDatagramHelper< JetByteTools::Socket::IPoolableDatagramSocket >, JetByteTools::Socket::IDatagramSocketConnectionManager, JetByteTools::Socket::IDatagramSocketCallback >, and TAsyncSocket< JetByteTools::Socket::IPoolableDatagramServerSocket, JetByteTools::Socket::IDatagramServerSocketConnectionManager, JetByteTools::Socket::IDatagramServerSocketCallback >.
virtual void SetUserPointer | ( | UserDataIndex | index, | |
void * | pData | |||
) | [pure virtual, inherited] |
Update the data stored at the specified index as a void pointer.
Implemented in TAsyncSocket< JetByteTools::Socket::IPoolableStreamSocket, JetByteTools::Socket::IStreamSocketConnectionManager, JetByteTools::Socket::IStreamSocketCallback >, TAsyncSocket< JetByteTools::Socket::TMulticastDatagramHelper< JetByteTools::Socket::IPoolableDatagramSocket >, JetByteTools::Socket::IDatagramSocketConnectionManager, JetByteTools::Socket::IDatagramSocketCallback >, and TAsyncSocket< JetByteTools::Socket::IPoolableDatagramServerSocket, JetByteTools::Socket::IDatagramServerSocketConnectionManager, JetByteTools::Socket::IDatagramServerSocketCallback >.
virtual ULONG_PTR GetUserData | ( | UserDataIndex | index | ) | const [pure virtual, inherited] |
Access the data stored at the specified index as an unsigned long.
Implemented in TAsyncSocket< JetByteTools::Socket::IPoolableStreamSocket, JetByteTools::Socket::IStreamSocketConnectionManager, JetByteTools::Socket::IStreamSocketCallback >, TAsyncSocket< JetByteTools::Socket::TMulticastDatagramHelper< JetByteTools::Socket::IPoolableDatagramSocket >, JetByteTools::Socket::IDatagramSocketConnectionManager, JetByteTools::Socket::IDatagramSocketCallback >, and TAsyncSocket< JetByteTools::Socket::IPoolableDatagramServerSocket, JetByteTools::Socket::IDatagramServerSocketConnectionManager, JetByteTools::Socket::IDatagramServerSocketCallback >.
virtual void SetUserData | ( | UserDataIndex | index, | |
ULONG_PTR | data | |||
) | [pure virtual, inherited] |
Update the data stored at the specified index as an unsigned long.
Implemented in TAsyncSocket< JetByteTools::Socket::IPoolableStreamSocket, JetByteTools::Socket::IStreamSocketConnectionManager, JetByteTools::Socket::IStreamSocketCallback >, TAsyncSocket< JetByteTools::Socket::TMulticastDatagramHelper< JetByteTools::Socket::IPoolableDatagramSocket >, JetByteTools::Socket::IDatagramSocketConnectionManager, JetByteTools::Socket::IDatagramSocketCallback >, and TAsyncSocket< JetByteTools::Socket::IPoolableDatagramServerSocket, JetByteTools::Socket::IDatagramServerSocketConnectionManager, JetByteTools::Socket::IDatagramServerSocketCallback >.
CSmartBuffer Allocate | ( | ) | [override, pure virtual, inherited] |
Allocate an instance of IBuffer, remember to call Release() on it when you're done with it.
Implements IAllocateBuffer.
Implemented in CNullBufferPool, TAsyncSocket< JetByteTools::Socket::IPoolableStreamSocket, JetByteTools::Socket::IStreamSocketConnectionManager, JetByteTools::Socket::IStreamSocketCallback >, TAsyncSocket< JetByteTools::Socket::TMulticastDatagramHelper< JetByteTools::Socket::IPoolableDatagramSocket >, JetByteTools::Socket::IDatagramSocketConnectionManager, JetByteTools::Socket::IDatagramSocketCallback >, TAsyncSocket< JetByteTools::Socket::IPoolableDatagramServerSocket, JetByteTools::Socket::IDatagramServerSocketConnectionManager, JetByteTools::Socket::IDatagramServerSocketCallback >, and TWebSocketBase< JetByteTools::WebSocket::HyBi::IWebSocket >.
virtual CSmartBuffer Allocate | ( | IAllocateBuffer & | allocator | ) | [pure virtual, inherited] |
Implemented in CNullBufferPool, TAsyncSocket< JetByteTools::Socket::IPoolableStreamSocket, JetByteTools::Socket::IStreamSocketConnectionManager, JetByteTools::Socket::IStreamSocketCallback >, TAsyncSocket< JetByteTools::Socket::TMulticastDatagramHelper< JetByteTools::Socket::IPoolableDatagramSocket >, JetByteTools::Socket::IDatagramSocketConnectionManager, JetByteTools::Socket::IDatagramSocketCallback >, TAsyncSocket< JetByteTools::Socket::IPoolableDatagramServerSocket, JetByteTools::Socket::IDatagramServerSocketConnectionManager, JetByteTools::Socket::IDatagramServerSocketCallback >, and TWebSocketBase< JetByteTools::WebSocket::HyBi::IWebSocket >.
CSmartBuffer AllocateCustomSizedBuffer | ( | IBuffer::BufferSize | bufferSize | ) | [override, pure virtual, inherited] |
virtual CSmartBuffer AllocateCustomSizedBuffer | ( | IAllocateBuffer & | allocator, | |
IBuffer::BufferSize | bufferSize | |||
) | [pure virtual, inherited] |
Implemented in CNullBufferPool.
virtual void AddBufferToPool | ( | IBuffer & | buffer | ) | [pure virtual, inherited] |
Implemented in CNullBufferPool.
JETBYTE_CONSTEXPR UserDataIndex InvalidUserDataIndex = 0xFFFF [static, inherited] |