6 Struct N_SOCKET
gullradriel edited this page 2026-11-02 12:42:25 +01:00

N_SOCKET

Module: NETWORK ENGINE: connect, accept, send and recv wrappers. Network Queue, thread-safe add/get message, ssl/tls secured communications

Structure of a N_SOCKET.

#include "n_network.h"

Public Attributes

Name
SOCKET sock
a normal socket
struct addrinfo * rhost
getaddrinfo results
struct sockaddr_storage raddr
connected remote addr
char * port
port of socket: the port connected to on a client socket, the listening port on a listener, and the PEER's port on a socket returned by netw_accept_from_ex() (the local port is the listener's)
unsigned long int is_blocking
flag to quickly check socket mode
char * ip
ip of the connected socket
struct addrinfo hints
address of local machine
struct addrinfo * connect_rp
addrinfo currently being tried by a non-blocking connect (netw_connect_nonblock / netw_connect_check); NULL otherwise

Public Attributes Documentation

variable sock

SOCKET sock;

a normal socket

variable rhost

struct addrinfo * rhost;

getaddrinfo results

variable raddr

struct sockaddr_storage raddr;

connected remote addr

variable port

char * port;

port of socket: the port connected to on a client socket, the listening port on a listener, and the PEER's port on a socket returned by netw_accept_from_ex() (the local port is the listener's)

variable is_blocking

unsigned long int is_blocking;

flag to quickly check socket mode

variable ip

char * ip;

ip of the connected socket

variable hints

struct addrinfo hints;

address of local machine

variable connect_rp

struct addrinfo * connect_rp;

addrinfo currently being tried by a non-blocking connect (netw_connect_nonblock / netw_connect_check); NULL otherwise