nngn
Loading...
Searching...
No Matches
nngn::Socket Class Reference

#include <socket.h>

Collaboration diagram for nngn::Socket:

Classes

class  lock
 

Public Member Functions

 Socket ()
 
 Socket (const Socket &)=delete
 
 Socket (const Socket &&)=delete
 
Socketoperator= (const Socket &)=delete
 
Socketoperator= (const Socket &&)=delete
 
 ~Socket ()
 
bool init (std::string_view path)
 
template<typename F >
bool process (F f)
 

Private Member Functions

bool accept ()
 
bool process (std::string *buffer)
 
bool recv (std::string *buffer)
 

Private Attributes

lock m_lock = {}
 
int fd = -1
 
std::vector< std::byte > poll_data = {}
 
std::string path = {}
 

Constructor & Destructor Documentation

◆ Socket() [1/3]

nngn::Socket::Socket ( )

◆ Socket() [2/3]

nngn::Socket::Socket ( const Socket & )
delete

◆ Socket() [3/3]

nngn::Socket::Socket ( const Socket && )
delete

◆ ~Socket()

nngn::Socket::~Socket ( )

Member Function Documentation

◆ accept()

bool nngn::Socket::accept ( )
private

◆ init()

bool nngn::Socket::init ( std::string_view path)
Here is the caller graph for this function:

◆ operator=() [1/2]

Socket & nngn::Socket::operator= ( const Socket && )
delete

◆ operator=() [2/2]

Socket & nngn::Socket::operator= ( const Socket & )
delete

◆ process() [1/2]

template<typename F >
bool nngn::Socket::process ( F f)
Here is the call graph for this function:

◆ process() [2/2]

bool nngn::Socket::process ( std::string * buffer)
private
Here is the caller graph for this function:

◆ recv()

bool nngn::Socket::recv ( std::string * buffer)
private

Member Data Documentation

◆ fd

int nngn::Socket::fd = -1
private

◆ m_lock

lock nngn::Socket::m_lock = {}
private

◆ path

std::string nngn::Socket::path = {}
private

◆ poll_data

std::vector<std::byte> nngn::Socket::poll_data = {}
private

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