Symphony Of Empires
Eng3D::Networking::Client Class Reference

#include <network.hpp>

Inheritance diagram for Eng3D::Networking::Client:

Classes

class  Exception
 

Public Member Functions

 Client (std::string host, const unsigned port)
 
 ~Client ()
 
void do_netloop (std::function< bool()> cond, std::function< void(const Packet &packet, Eng3D::Deser::Archive &ar)> handler)
 
void send (const Eng3D::Networking::Packet &packet)
 
int get_fd () const
 

Public Attributes

tbb::concurrent_bounded_queue< Eng3D::Networking::Packetpackets
 
std::string username
 

Protected Attributes

struct sockaddr_in addr
 
int fd
 

Detailed Description

Definition at line 190 of file network.hpp.

Constructor & Destructor Documentation

◆ Client()

Client::Client ( std::string  host,
const unsigned  port 
)

Definition at line 380 of file network.cpp.

Here is the call graph for this function:

◆ ~Client()

Client::~Client ( )

Definition at line 415 of file network.cpp.

Member Function Documentation

◆ do_netloop()

void Client::do_netloop ( std::function< bool()>  cond,
std::function< void(const Packet &packet, Eng3D::Deser::Archive &ar)>  handler 
)

Definition at line 424 of file network.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_fd()

int Eng3D::Networking::Client::get_fd ( ) const
inline

Definition at line 216 of file network.hpp.

◆ send()

void Eng3D::Networking::Client::send ( const Eng3D::Networking::Packet packet)
inline

Definition at line 212 of file network.hpp.

Member Data Documentation

◆ addr

struct sockaddr_in Eng3D::Networking::Client::addr
protected

Definition at line 171 of file network.hpp.

◆ fd

int Eng3D::Networking::Client::fd
protected

Definition at line 193 of file network.hpp.

◆ packets

tbb::concurrent_bounded_queue<Eng3D::Networking::Packet> Eng3D::Networking::Client::packets

Definition at line 220 of file network.hpp.

◆ username

std::string Eng3D::Networking::Client::username

Definition at line 221 of file network.hpp.


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