Sane C++ Libraries
C++ Platform Abstraction Libraries
Loading...
Searching...
No Matches
SC::AsyncSocketReceive::Result Struct Reference
Inheritance diagram for SC::AsyncSocketReceive::Result:
SC::AsyncResultOf< AsyncSocketReceive, CompletionData > SC::AsyncResult

Public Member Functions

bool isEnded () const
 
SC::Result get (Span< char > &outData)
 Get a Span of the actually read data.
 
SocketIPAddress getSourceAddress () const
 Returns the source when it is an IPv4 or IPv6 address.
 
SocketAddress getSourceSocketAddress () const
 Returns the family-neutral source address for receive-from operations.
 
- Public Member Functions inherited from SC::AsyncResultOf< AsyncSocketReceive, CompletionData >
AsyncSocketReceivegetAsync ()
 
const AsyncSocketReceivegetAsync () const
 
 AsyncResult (AsyncEventLoop &eventLoop, AsyncRequest &request, SC::Result &res, bool *hasBeenReactivated=nullptr)
 Constructs an async result from a request and a result.
 
- Public Member Functions inherited from SC::AsyncResult
 AsyncResult (AsyncEventLoop &eventLoop, AsyncRequest &request, SC::Result &res, bool *hasBeenReactivated=nullptr)
 Constructs an async result from a request and a result.
 
void reactivateRequest (bool shouldBeReactivated)
 Ask the event loop to re-activate this request after it was already completed.
 
const SC::Result & isValid () const
 Check if the returnCode of this result is valid.
 

Additional Inherited Members

- Public Attributes inherited from SC::AsyncResultOf< AsyncSocketReceive, CompletionData >
CompletionData completionData
 
int32_t eventIndex
 
- Public Attributes inherited from SC::AsyncResult
AsyncEventLoopeventLoop
 
AsyncRequestasync
 
- Protected Attributes inherited from SC::AsyncResult
bool shouldCallCallback = true
 
bool * hasBeenReactivated = nullptr
 
SC::Result & returnCode
 

Member Function Documentation

◆ get()

SC::Result SC::AsyncSocketReceive::Result::get ( Span< char > & outData)
inline

Get a Span of the actually read data.

Parameters
outDataThe span of data actually read from socket
Returns
Valid Result if the data was read without errors

◆ getSourceAddress()

SocketIPAddress SC::AsyncSocketReceive::Result::getSourceAddress ( ) const

Returns the source when it is an IPv4 or IPv6 address.

Note
Use getSourceSocketAddress for family-neutral source reporting.

◆ getSourceSocketAddress()

SocketAddress SC::AsyncSocketReceive::Result::getSourceSocketAddress ( ) const

Returns the family-neutral source address for receive-from operations.


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