From 6416c8feecc760807f4edf5d9c8e8be9c2df8981 Mon Sep 17 00:00:00 2001 From: mrfoxygmfr Date: Tue, 20 May 2025 21:50:25 +0300 Subject: feat(lib/net): network library implemented --- lib/net/common.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 lib/net/common.h (limited to 'lib/net/common.h') diff --git a/lib/net/common.h b/lib/net/common.h new file mode 100644 index 0000000..f7c4c9a --- /dev/null +++ b/lib/net/common.h @@ -0,0 +1,19 @@ +#ifndef NET__COMMON_H +#define NET__COMMON_H + +#include "../common.h" + +#include +#include +#include + +typedef struct { + int conn_socket_fd; +} conn_t; + +struct sockaddr_in* get_addr(const char* addr, const char* port); + +int conn_configure_tcpalive(conn_t* conn); +void conn_close(conn_t* conn); + +#endif // NET__COMMON_H -- cgit mrf-deployment