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)
 
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
 

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
virtual NET_PacketSocket::~NET_PacketSocket ( )
virtualdefault

Member Function Documentation

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 89 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 103 of file NET_PacketSocket.h.

Member Data Documentation

Handler && NET_PacketSocket::handler

Definition at line 109 of file NET_PacketSocket.h.


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