HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NET_PacketSocket Class Reference

#include <NET_PacketSocket.h>

Public Member Functions

 NET_PacketSocket (ASIO_TCPSocket &&socket)
 
 NET_PacketSocket (ASIO_IOContext &ctx)
 
virtual ~NET_PacketSocket ()=default
 
void close ()
 
ASIO_TCPSocketnextLayer ()
 
template<typename DynamicBuffer , typename Handler >
 HBOOST_ASIO_INITFN_RESULT_TYPE (Handler, void(hboost::system::error_code, std::size_t)) asyncRead(DynamicBuffer &buffer
 
template<typename Handler >
 HBOOST_ASIO_INITFN_RESULT_TYPE (Handler, void(hboost::system::error_code, std::size_t)) asyncWrite(UT_StringArray &&buffers
 
template<typename Handler >
 asyncConnect (const ASIO_TCPSocket::endpoint_type &ep, Handler &&handler)
 

Public Attributes

Handler && handler
 

Detailed Description

Definition at line 30 of file NET_PacketSocket.h.

Constructor & Destructor Documentation

NET_PacketSocket::NET_PacketSocket ( ASIO_TCPSocket &&  socket)
explicit
NET_PacketSocket::NET_PacketSocket ( ASIO_IOContext ctx)
explicit
virtual NET_PacketSocket::~NET_PacketSocket ( )
virtualdefault

Member Function Documentation

template<typename Handler >
NET_PacketSocket::asyncConnect ( const ASIO_TCPSocket::endpoint_type &  ep,
Handler &&  handler 
)
inline

Definition at line 118 of file NET_PacketSocket.h.

void NET_PacketSocket::close ( )
inline

Shutdown the socket. After this is called the socket becomes dead and no other calls should be made.

Definition at line 90 of file NET_PacketSocket.h.

template<typename DynamicBuffer , typename Handler >
NET_PacketSocket::HBOOST_ASIO_INITFN_RESULT_TYPE ( Handler  ,
void(hboost::system::error_code, std::size_t)   
)
template<typename Handler >
NET_PacketSocket::HBOOST_ASIO_INITFN_RESULT_TYPE ( Handler  ,
void(hboost::system::error_code, std::size_t)   
)
ASIO_TCPSocket& NET_PacketSocket::nextLayer ( )
inline

Access to the underlying socket. This only meant to be used in cases where information about the connection is required (ie. remote endpoint) NB: this method should only ever be called prior to the first read/write of the socket for thread safety.

Definition at line 104 of file NET_PacketSocket.h.

Member Data Documentation

Handler && NET_PacketSocket::handler

Definition at line 110 of file NET_PacketSocket.h.


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