Sese Framework
2.3.0
A cross-platform framework
|
Native IOCP operational context. More...
#include <NativeIOCPServer_V1.h>
Public Member Functions | |
NativeContext (OverlappedWrapper *p_wrapper) | |
~NativeContext () override | |
int64_t | read (void *buffer, size_t length) override |
int64_t | write (const void *buffer, size_t length) override |
int64_t | peek (void *buffer, size_t length) override |
int64_t | trunc (size_t length) override |
int32_t | getFd () const |
void * | getData () const |
void | setData (void *p_data) |
Public Member Functions inherited from sese::io::InputStream | |
virtual | ~InputStream () noexcept=default |
Public Member Functions inherited from sese::io::OutputStream | |
virtual | ~OutputStream () noexcept=default |
int64_t | write (const std::string_view &buffer) |
int64_t | write (const text::StringView &buffer) |
template<typename T > | |
int64_t | write (std::vector< T > &buffer) |
template<typename T , size_t N> | |
int64_t | write (std::array< T, N > &buffer) |
Public Member Functions inherited from sese::io::PeekableStream | |
virtual | ~PeekableStream ()=default |
Private Types | |
enum class | Type { READ , WRITE , CONNECT , READY , CLOSE } |
using | IOBuf = sese::iocp::IOBuf |
using | Node = std::unique_ptr<sese::iocp::IOBufNode> |
Private Attributes | |
OverlappedWrapper * | pWrapper {} |
WSABUF | wsabufRead {} |
WSABUF | wsabufWrite {} |
Type | type {Type::READ} |
SOCKET | fd {INVALID_SOCKET} |
NativeIOCPServer * | self {} |
TimeoutEvent * | timeoutEvent {} |
void * | ssl {} |
void * | bio {} |
Node | readNode |
IOBuf | recv {} |
io::ByteBuilder | send {IOCP_WSABUF_SIZE, IOCP_WSABUF_SIZE} |
void * | data {} |
Friends | |
class | NativeIOCPServer |
Additional Inherited Members | |
Public Types inherited from sese::io::InputStream | |
typedef std::shared_ptr< InputStream > | Ptr |
Public Types inherited from sese::io::OutputStream | |
typedef std::shared_ptr< OutputStream > | Ptr |
Public Types inherited from sese::io::PeekableStream | |
typedef std::shared_ptr< PeekableStream > | Ptr |
Native IOCP operational context.
|
private |
|
private |
|
strongprivate |
|
explicit |
Context initialization
p_wrapper | Overlapped wrapper |
References IOCP_WSABUF_SIZE, and wsabufWrite.
|
override |
References free(), and wsabufWrite.
|
inlinenodiscard |
|
inlinenodiscard |
|
overridevirtual |
Read content from the current connection without advancing
buffer | The buffer |
length | The size of the buffer |
Implements sese::io::PeekableStream.
References sese::iocp::IOBuf::peek(), recv, and ssl.
|
overridevirtual |
Read content from the current connection
buffer | The buffer |
length | The size of the buffer |
Implements sese::io::InputStream.
References sese::iocp::IOBuf::read(), recv, and ssl.
|
inline |
Set the additional data of the current context
p_data | The additional data |
References data.
|
overridevirtual |
Advance in the current connection without reading content
length | The amount to advance |
Implements sese::io::PeekableStream.
References recv, ssl, and sese::iocp::IOBuf::trunc().
|
overridevirtual |
Write content to the current connection
buffer | The buffer |
length | The size of the buffer |
Implements sese::io::OutputStream.
References send, ssl, and sese::io::AbstractByteBuffer::write().
|
friend |
|
private |
|
private |
|
private |
|
private |
|
private |
Referenced by sese::_windows::iocp::v1::NativeIOCPServer::postRead().
|
private |
|
private |
|
private |
Referenced by sese::_windows::iocp::v1::NativeIOCPServer::postWrite(), and write().
|
private |
|
private |
|
private |
|
private |
Referenced by sese::_windows::iocp::v1::NativeIOCPServer::postRead().
|
private |
Referenced by NativeContext(), sese::_windows::iocp::v1::NativeIOCPServer::postWrite(), and ~NativeContext().