Flutter Engine
The Flutter Engine
Public Types | Public Member Functions | Static Public Member Functions | List of all members
dart::bin::OverlappedBuffer Class Reference

#include <eventhandler_win.h>

Public Types

enum  Operation {
  kAccept , kRead , kRecvFrom , kWrite ,
  kSendTo , kDisconnect , kConnect
}
 

Public Member Functions

int Read (void *buffer, int num_bytes)
 
int Write (const void *buffer, int num_bytes)
 
int GetRemainingLength ()
 
bool IsEmpty ()
 
Operation operation () const
 
SOCKET client () const
 
char * GetBufferStart ()
 
int GetBufferSize () const
 
struct sockaddr * from () const
 
socklen_t * from_len_addr () const
 
socklen_t from_len () const
 
OVERLAPPEDGetCleanOverlapped ()
 
WSABUF * GetWASBUF ()
 
void set_data_length (int data_length)
 
void operator delete (void *buffer)
 

Static Public Member Functions

static OverlappedBufferAllocateAcceptBuffer (int buffer_size)
 
static OverlappedBufferAllocateReadBuffer (int buffer_size)
 
static OverlappedBufferAllocateRecvFromBuffer (int buffer_size)
 
static OverlappedBufferAllocateWriteBuffer (int buffer_size)
 
static OverlappedBufferAllocateSendToBuffer (int buffer_size)
 
static OverlappedBufferAllocateDisconnectBuffer ()
 
static OverlappedBufferAllocateConnectBuffer ()
 
static void DisposeBuffer (OverlappedBuffer *buffer)
 
static OverlappedBufferGetFromOverlapped (OVERLAPPED *overlapped)
 

Detailed Description

Definition at line 37 of file eventhandler_win.h.

Member Enumeration Documentation

◆ Operation

Enumerator
kAccept 
kRead 
kRecvFrom 
kWrite 
kSendTo 
kDisconnect 
kConnect 

Definition at line 39 of file eventhandler_win.h.

Member Function Documentation

◆ AllocateAcceptBuffer()

static OverlappedBuffer * dart::bin::OverlappedBuffer::AllocateAcceptBuffer ( int  buffer_size)
static

◆ AllocateConnectBuffer()

static OverlappedBuffer * dart::bin::OverlappedBuffer::AllocateConnectBuffer ( )
static

◆ AllocateDisconnectBuffer()

static OverlappedBuffer * dart::bin::OverlappedBuffer::AllocateDisconnectBuffer ( )
static

◆ AllocateReadBuffer()

static OverlappedBuffer * dart::bin::OverlappedBuffer::AllocateReadBuffer ( int  buffer_size)
static

◆ AllocateRecvFromBuffer()

static OverlappedBuffer * dart::bin::OverlappedBuffer::AllocateRecvFromBuffer ( int  buffer_size)
static

◆ AllocateSendToBuffer()

static OverlappedBuffer * dart::bin::OverlappedBuffer::AllocateSendToBuffer ( int  buffer_size)
static

◆ AllocateWriteBuffer()

static OverlappedBuffer * dart::bin::OverlappedBuffer::AllocateWriteBuffer ( int  buffer_size)
static

◆ client()

SOCKET dart::bin::OverlappedBuffer::client ( ) const
inline

Definition at line 78 of file eventhandler_win.h.

78{ return client_; }

◆ DisposeBuffer()

static void dart::bin::OverlappedBuffer::DisposeBuffer ( OverlappedBuffer buffer)
static

◆ from()

struct sockaddr * dart::bin::OverlappedBuffer::from ( ) const
inline

Definition at line 81 of file eventhandler_win.h.

81{ return from_; }

◆ from_len()

socklen_t dart::bin::OverlappedBuffer::from_len ( ) const
inline

Definition at line 83 of file eventhandler_win.h.

83{ return from_ == nullptr ? 0 : *from_len_addr_; }

◆ from_len_addr()

socklen_t * dart::bin::OverlappedBuffer::from_len_addr ( ) const
inline

Definition at line 82 of file eventhandler_win.h.

82{ return from_len_addr_; }

◆ GetBufferSize()

int dart::bin::OverlappedBuffer::GetBufferSize ( ) const
inline

Definition at line 80 of file eventhandler_win.h.

80{ return buflen_; }

◆ GetBufferStart()

char * dart::bin::OverlappedBuffer::GetBufferStart ( )
inline

Definition at line 79 of file eventhandler_win.h.

79{ return reinterpret_cast<char*>(&buffer_data_); }

◆ GetCleanOverlapped()

OVERLAPPED * dart::bin::OverlappedBuffer::GetCleanOverlapped ( )
inline

Definition at line 87 of file eventhandler_win.h.

87 {
88 memset(&overlapped_, 0, sizeof(overlapped_));
89 return &overlapped_;
90 }

◆ GetFromOverlapped()

static OverlappedBuffer * dart::bin::OverlappedBuffer::GetFromOverlapped ( OVERLAPPED overlapped)
static

◆ GetRemainingLength()

int dart::bin::OverlappedBuffer::GetRemainingLength ( )

◆ GetWASBUF()

WSABUF * dart::bin::OverlappedBuffer::GetWASBUF ( )
inline

Definition at line 93 of file eventhandler_win.h.

93 {
94 wbuf_.buf = GetBufferStart();
95 wbuf_.len = GetBufferSize();
96 return &wbuf_;
97 }

◆ IsEmpty()

bool dart::bin::OverlappedBuffer::IsEmpty ( )
inline

Definition at line 75 of file eventhandler_win.h.

75{ return GetRemainingLength() == 0; }

◆ operation()

Operation dart::bin::OverlappedBuffer::operation ( ) const
inline

Definition at line 77 of file eventhandler_win.h.

77{ return operation_; }

◆ operator delete()

void dart::bin::OverlappedBuffer::operator delete ( void *  buffer)
inline

Definition at line 101 of file eventhandler_win.h.

101{ free(buffer); }
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
Definition: switches.h:126

◆ Read()

int dart::bin::OverlappedBuffer::Read ( void *  buffer,
int  num_bytes 
)

◆ set_data_length()

void dart::bin::OverlappedBuffer::set_data_length ( int  data_length)
inline

Definition at line 99 of file eventhandler_win.h.

99{ data_length_ = data_length; }

◆ Write()

int dart::bin::OverlappedBuffer::Write ( const void *  buffer,
int  num_bytes 
)

The documentation for this class was generated from the following file: