![]() |
olcPixelGameEngine v2.28
The official distribution of olcPixelGameEngine, a tool used in javidx9's YouTube videos and projects
|
#include <olcPGEX_Network.h>
Public Types | |
enum class | owner { server , client } |
Public Member Functions | |
connection (owner parent, asio::io_context &asioContext, asio::ip::tcp::socket socket, tsqueue< owned_message< T > > &qIn) | |
virtual | ~connection () |
uint32_t | GetID () const |
void | ConnectToClient (olc::net::server_interface< T > *server, uint32_t uid=0) |
void | ConnectToServer (const asio::ip::tcp::resolver::results_type &endpoints) |
void | Disconnect () |
bool | IsConnected () const |
void | StartListening () |
void | Send (const message< T > &msg) |
Protected Attributes | |
asio::ip::tcp::socket | m_socket |
asio::io_context & | m_asioContext |
tsqueue< message< T > > | m_qMessagesOut |
tsqueue< owned_message< T > > & | m_qMessagesIn |
message< T > | m_msgTemporaryIn |
owner | m_nOwnerType = owner::server |
uint64_t | m_nHandshakeOut = 0 |
uint64_t | m_nHandshakeIn = 0 |
uint64_t | m_nHandshakeCheck = 0 |
bool | m_bValidHandshake = false |
bool | m_bConnectionEstablished = false |
uint32_t | id = 0 |
|
strong |
|
inline |
|
inlinevirtual |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |