An encapsulation of the socket file descriptor.
More...
#include <Socket.hpp>
|
| | Socket (int domain, int type, int protocol) |
| | Constructor for Socket class.
|
| |
| | Socket (int sockfd=-1) |
| | Constructor for Socket class.
|
| |
| | ~Socket () |
| | Deleted copy constructor.
|
| |
| int | getSocket () const |
| | Gets the socket file descriptor.
|
| |
| void | operator() (int sockfd) |
| | Sets the socket file descriptor.
|
| |
| void | operator= (int sockfd) |
| | Sets the socket file descriptor.
|
| |
| bool | operator== (int sockfd) const |
| | Compares the socket file descriptor.
|
| |
An encapsulation of the socket file descriptor.
◆ Socket() [1/2]
| Socket |
( |
int | domain, |
|
|
int | type, |
|
|
int | protocol ) |
Constructor for Socket class.
- Parameters
-
| domain | The domain of the socket |
| type | The type of the socket |
| protocol | The protocol of the socket |
- Exceptions
-
◆ Socket() [2/2]
Constructor for Socket class.
- Parameters
-
| sockfd | The socket file descriptor |
◆ ~Socket()
Deleted copy constructor.
- Parameters
-
| other | The other Socket object to copy from |
◆ getSocket()
Gets the socket file descriptor.
- Returns
- The socket file descriptor
◆ operator()()
| void operator() |
( |
int | sockfd | ) |
|
Sets the socket file descriptor.
- Parameters
-
| sockfd | The socket file descriptor |
◆ operator=()
| void operator= |
( |
int | sockfd | ) |
|
Sets the socket file descriptor.
- Parameters
-
| sockfd | The socket file descriptor |
◆ operator==()
| bool operator== |
( |
int | sockfd | ) |
const |
Compares the socket file descriptor.
- Parameters
-
| sockfd | The socket file descriptor |
- Returns
- True if the socket file descriptor is equal to the current one and False if the socket file descriptor is not equal to the current one
The documentation for this class was generated from the following files: