VOX
A little voxel engine
Loading...
Searching...
No Matches
ServerSocket Class Reference

a class that represents a server socket. you can accept connections from clients. More...

#include <ServerSocket.hpp>

Inheritance diagram for ServerSocket:
Inheritance graph
Collaboration diagram for ServerSocket:
Collaboration graph

Public Member Functions

 ServerSocket (int port)
 
virtual ~ServerSocket ()
 
 ServerSocket (const ServerSocket &other)=delete
 
ServerSocketoperator= (const ServerSocket &other)=delete
 
 ServerSocket (ServerSocket &&other)
 
ServerSocketoperator= (ServerSocket &&other)
 
std::shared_ptr< ConnectionSocketaccept ()
 
- Public Member Functions inherited from Socket
virtual ~Socket ()
 
int getFd () const
 
 Socket (const Socket &other)=delete
 
Socketoperator= (const Socket &other)=delete
 
 Socket (Socket &&other)
 
Socketoperator= (Socket &&other)
 
bool operator== (const Socket &other) const
 
bool operator== (const int &fd) const
 

Static Public Attributes

static constexpr int MAX_BACKLOG = 10
 

Additional Inherited Members

- Protected Member Functions inherited from Socket
 Socket ()
 
void close ()
 
- Protected Attributes inherited from Socket
int m_sockfd = -1
 

Detailed Description

a class that represents a server socket. you can accept connections from clients.

Constructor & Destructor Documentation

◆ ServerSocket() [1/3]

ServerSocket::ServerSocket ( int  port)

◆ ~ServerSocket()

ServerSocket::~ServerSocket ( )
virtual

◆ ServerSocket() [2/3]

ServerSocket::ServerSocket ( const ServerSocket other)
delete

◆ ServerSocket() [3/3]

ServerSocket::ServerSocket ( ServerSocket &&  other)

Member Function Documentation

◆ accept()

std::shared_ptr< ConnectionSocket > ServerSocket::accept ( )

◆ operator=() [1/2]

ServerSocket & ServerSocket::operator= ( const ServerSocket other)
delete

◆ operator=() [2/2]

ServerSocket & ServerSocket::operator= ( ServerSocket &&  other)

Member Data Documentation

◆ MAX_BACKLOG

constexpr int ServerSocket::MAX_BACKLOG = 10
staticconstexpr

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