|
libclod
C library for interacting with NBTs, region files, LOD data and other things.
|
Networking. More...
Go to the source code of this file.
Classes | |
| struct | clod_socket |
Macros | |
| #define | clod_ipv4(a, b, c, d) |
| Helper for crating IPv4-mapped IPv6 address. | |
Typedefs | |
| typedef struct clod_socker | clod_socket |
Functions | |
| int | clod_udp (clod_socket *socket, int flags) |
| int | clod_tcp_client (clod_socket *socket, int flags) |
| int | clod_tcp_server (clod_socket *socket, int flags) |
Networking.
Methods for TCP and UDP connections using libclod's stream API. IPv4 is also supported - just use an IPv4-mapped IPv6 address; bytes 0-10 = 0, byte 11 = 0xFF, bytes 12-15 = IPv4 address.
Definition in file net.h.
| #define clod_ipv4 | ( | a, | |
| b, | |||
| c, | |||
| d ) |
| int clod_udp | ( | clod_socket * | socket, |
| int | flags ) |
Initialise a UDP socket for reading and writing.
| [in,out] | socket | New TCP socket. |
| [in] | flags | Configuration flags. |
| int clod_tcp_client | ( | clod_socket * | socket, |
| int | flags ) |
Initialise a TCP client-side socket for reading and writing. Upon a successful connection, the stream transfers bytes between
| [in,out] | socket | New TCP socket. |
| [in] | flags | Configuration flags. |
| int clod_tcp_server | ( | clod_socket * | socket, |
| int | flags ) |
Initialise a TCP
| [in,out] | socket | New TCP socket. |
| [in] | flags | Configuration flags. |