Luanti 5.16.0-dev
Loading...
Searching...
No Matches
socket.cpp File Reference
#include "socket.h"
#include <iostream>
#include <cstring>
#include "util/numeric.h"
#include "address.h"
#include "constants.h"
#include "log.h"
#include "networkexceptions.h"
#include <cerrno>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <fcntl.h>
#include <poll.h>
#include <unistd.h>
#include <arpa/inet.h>
Include dependency graph for socket.cpp:

Macros

#define LAST_SOCKET_ERR()
#define SOCKET_ERR_STR(e)

Functions

void sockets_init ()
void sockets_cleanup ()

Variables

static bool g_sockets_initialized = false

Macro Definition Documentation

◆ LAST_SOCKET_ERR

#define LAST_SOCKET_ERR ( )
Value:
(errno)

◆ SOCKET_ERR_STR

#define SOCKET_ERR_STR ( e)
Value:
strerror(e)

Referenced by UDPSocket::Bind(), UDPSocket::init(), and UDPSocket::WaitData().

Function Documentation

◆ sockets_cleanup()

void sockets_cleanup ( )

References g_sockets_initialized.

Referenced by uninit_common().

Here is the caller graph for this function:

◆ sockets_init()

void sockets_init ( )

References g_sockets_initialized.

Referenced by init_common().

Here is the caller graph for this function:

Variable Documentation

◆ g_sockets_initialized

bool g_sockets_initialized = false
static