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

#include <network.hpp>

Public Member Functions

 SocketStream ()=default
 
 SocketStream (int _fd)
 
 ~SocketStream ()=default
 
bool send (const void *data, size_t size, std::function< bool()> pred)
 
bool recv (void *data, size_t size, std::function< bool()> pred=0)
 
void set_timeout (int seconds)
 
bool has_pending ()
 
void set_blocking (bool value)
 

Public Attributes

int fd
 

Detailed Description

Definition at line 79 of file network.hpp.

Constructor & Destructor Documentation

◆ SocketStream() [1/2]

Eng3D::Networking::SocketStream::SocketStream ( )
default

◆ SocketStream() [2/2]

Eng3D::Networking::SocketStream::SocketStream ( int  _fd)
inline

Definition at line 83 of file network.hpp.

◆ ~SocketStream()

Eng3D::Networking::SocketStream::~SocketStream ( )
default

Member Function Documentation

◆ has_pending()

bool Eng3D::Networking::SocketStream::has_pending ( )

Definition at line 128 of file network.cpp.

Here is the caller graph for this function:

◆ recv()

bool Eng3D::Networking::SocketStream::recv ( void *  data,
size_t  size,
std::function< bool()>  pred = 0 
)

Definition at line 94 of file network.cpp.

◆ send()

bool Eng3D::Networking::SocketStream::send ( const void *  data,
size_t  size,
std::function< bool()>  pred 
)

Definition at line 74 of file network.cpp.

◆ set_blocking()

void Eng3D::Networking::SocketStream::set_blocking ( bool  value)

Definition at line 143 of file network.cpp.

Here is the call graph for this function:

◆ set_timeout()

void Eng3D::Networking::SocketStream::set_timeout ( int  seconds)

Definition at line 115 of file network.cpp.

Member Data Documentation

◆ fd

int Eng3D::Networking::SocketStream::fd

Definition at line 91 of file network.hpp.


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