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

#include <eventhandler_win.h>

Inheritance diagram for dart::bin::ListenSocket:
dart::bin::DescriptorInfoMultipleMixin< SocketHandle > dart::bin::SocketHandle dart::bin::Handle dart::bin::ReferenceCounted< Handle > dart::bin::DescriptorInfoBase

Public Member Functions

 ListenSocket (intptr_t s)
 
virtual ~ListenSocket ()
 
ClientSocketAccept ()
 
bool CanAccept ()
 
bool HasPendingAccept ()
 
bool IssueAccept ()
 
void AcceptComplete (OverlappedBuffer *buffer, HANDLE completion_port)
 
virtual void EnsureInitialized (EventHandlerImplementation *event_handler)
 
virtual void DoClose ()
 
virtual bool IsClosed ()
 
int pending_accept_count ()
 
int accepted_count ()
 
- Public Member Functions inherited from dart::bin::DescriptorInfoMultipleMixin< SocketHandle >
 DescriptorInfoMultipleMixin (intptr_t fd, bool disable_tokens)
 
virtual ~DescriptorInfoMultipleMixin ()
 
virtual bool IsListeningSocket () const
 
virtual void SetPortAndMask (Dart_Port port, intptr_t mask)
 
virtual void RemovePort (Dart_Port port)
 
virtual void RemoveAllPorts ()
 
virtual Dart_Port NextNotifyDartPort (intptr_t events_ready)
 
virtual void NotifyAllDartPorts (uintptr_t events)
 
virtual void ReturnTokens (Dart_Port port, int count)
 
virtual intptr_t Mask ()
 
virtual void Close ()
 
- Public Member Functions inherited from dart::bin::SocketHandle
SOCKET socket () const
 
- Public Member Functions inherited from dart::bin::Handle
intptr_t Available ()
 
bool DataReady ()
 
intptr_t Read (void *buffer, intptr_t num_bytes)
 
intptr_t RecvFrom (void *buffer, intptr_t num_bytes, struct sockaddr *sa, socklen_t addr_len)
 
virtual intptr_t Write (const void *buffer, intptr_t num_bytes)
 
virtual intptr_t SendTo (const void *buffer, intptr_t num_bytes, struct sockaddr *sa, socklen_t sa_len)
 
virtual bool IssueRead ()
 
virtual bool IssueRecvFrom ()
 
virtual bool IssueWrite ()
 
virtual bool IssueSendTo (struct sockaddr *sa, socklen_t sa_len)
 
bool HasPendingRead ()
 
bool HasPendingWrite ()
 
void ReadComplete (OverlappedBuffer *buffer)
 
void RecvFromComplete (OverlappedBuffer *buffer)
 
void WriteComplete (OverlappedBuffer *buffer)
 
bool IsClosing ()
 
bool IsClosedRead ()
 
bool IsClosedWrite ()
 
bool IsError ()
 
void MarkClosing ()
 
void MarkClosedRead ()
 
void MarkClosedWrite ()
 
void MarkError ()
 
virtual void EnsureInitialized (EventHandlerImplementation *event_handler)=0
 
HANDLE handle ()
 
bool CreateCompletionPort (HANDLE completion_port)
 
void Close ()
 
virtual void DoClose ()
 
virtual bool IsClosed ()=0
 
bool IsHandleClosed () const
 
Type type ()
 
bool is_file ()
 
bool is_socket ()
 
bool is_listen_socket ()
 
bool is_client_socket ()
 
bool is_datagram_socket ()
 
void MarkDoesNotSupportOverlappedIO ()
 
bool SupportsOverlappedIO ()
 
void ReadSyncCompleteAsync ()
 
DWORD last_error ()
 
void set_last_error (DWORD last_error)
 
void set_completion_port (HANDLE completion_port)
 
void set_event_handler (EventHandlerImplementation *event_handler)
 
- Public Member Functions inherited from dart::bin::ReferenceCounted< Handle >
 ReferenceCounted ()
 
virtual ~ReferenceCounted ()
 
void Retain ()
 
void Release ()
 
- Public Member Functions inherited from dart::bin::DescriptorInfoBase
 DescriptorInfoBase (intptr_t fd)
 
virtual ~DescriptorInfoBase ()
 
intptr_t fd ()
 
virtual bool IsListeningSocket () const =0
 
virtual void SetPortAndMask (Dart_Port port, intptr_t mask)=0
 
virtual void RemovePort (Dart_Port port)=0
 
virtual void RemoveAllPorts ()=0
 
virtual Dart_Port NextNotifyDartPort (intptr_t events_ready)=0
 
virtual void NotifyAllDartPorts (uintptr_t events)=0
 
virtual void ReturnTokens (Dart_Port port, int count)=0
 
virtual intptr_t Mask ()=0
 
virtual void Close ()=0
 

Additional Inherited Members

- Public Types inherited from dart::bin::Handle
enum  Type {
  kFile , kStd , kDirectoryWatch , kClientSocket ,
  kListenSocket , kDatagramSocket
}
 
- Protected Types inherited from dart::bin::Handle
enum  Flags {
  kClosing = 0 , kCloseRead = 1 , kCloseWrite = 2 , kDoesNotSupportOverlappedIO = 3 ,
  kError = 4
}
 
- Protected Member Functions inherited from dart::bin::SocketHandle
 SocketHandle (intptr_t s)
 
virtual void HandleIssueError ()
 
- Protected Member Functions inherited from dart::bin::Handle
 Handle (intptr_t handle)
 
virtual ~Handle ()
 
virtual void HandleIssueError ()
 
- Protected Attributes inherited from dart::bin::Handle
Monitor monitor_
 
Type type_
 
HANDLE handle_
 
HANDLE completion_port_
 
EventHandlerImplementationevent_handler_
 
std::unique_ptr< OverlappedBufferdata_ready_
 
OverlappedBufferpending_read_
 
OverlappedBufferpending_write_
 
DWORD last_error_
 
ThreadId read_thread_id_
 
HANDLE read_thread_handle_
 
bool read_thread_starting_
 
bool read_thread_finished_
 
- Protected Attributes inherited from dart::bin::DescriptorInfoBase
intptr_t fd_
 

Detailed Description

Definition at line 387 of file eventhandler_win.h.

Constructor & Destructor Documentation

◆ ListenSocket()

dart::bin::ListenSocket::ListenSocket ( intptr_t  s)
inlineexplicit

Definition at line 389 of file eventhandler_win.h.

391 AcceptEx_(nullptr),
392 GetAcceptExSockaddrs_(nullptr),
393 pending_accept_count_(0),
394 accepted_head_(nullptr),
395 accepted_tail_(nullptr),
396 accepted_count_(0) {
398 }
DescriptorInfoMultipleMixin(intptr_t fd, bool disable_tokens)
Definition: eventhandler.h:392
struct MyStruct s

◆ ~ListenSocket()

virtual dart::bin::ListenSocket::~ListenSocket ( )
inlinevirtual

Definition at line 399 of file eventhandler_win.h.

399 {
401 ASSERT(accepted_head_ == nullptr);
402 ASSERT(accepted_tail_ == nullptr);
403 }
#define ASSERT(E)

Member Function Documentation

◆ Accept()

ClientSocket * dart::bin::ListenSocket::Accept ( )

◆ AcceptComplete()

void dart::bin::ListenSocket::AcceptComplete ( OverlappedBuffer buffer,
HANDLE  completion_port 
)

◆ accepted_count()

int dart::bin::ListenSocket::accepted_count ( )
inline

Definition at line 420 of file eventhandler_win.h.

420{ return accepted_count_; }

◆ CanAccept()

bool dart::bin::ListenSocket::CanAccept ( )

◆ DoClose()

virtual void dart::bin::ListenSocket::DoClose ( )
virtual

Reimplemented from dart::bin::Handle.

◆ EnsureInitialized()

virtual void dart::bin::ListenSocket::EnsureInitialized ( EventHandlerImplementation event_handler)
virtual

Implements dart::bin::Handle.

◆ HasPendingAccept()

bool dart::bin::ListenSocket::HasPendingAccept ( )
inline

Definition at line 410 of file eventhandler_win.h.

410{ return pending_accept_count_ > 0; }

◆ IsClosed()

virtual bool dart::bin::ListenSocket::IsClosed ( )
virtual

Implements dart::bin::Handle.

◆ IssueAccept()

bool dart::bin::ListenSocket::IssueAccept ( )

◆ pending_accept_count()

int dart::bin::ListenSocket::pending_accept_count ( )
inline

Definition at line 418 of file eventhandler_win.h.

418{ return pending_accept_count_; }

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