2023-05-21 18:47:35 -04:00
|
|
|
#ifndef OCT_NETWORKING_H
|
|
|
|
#define OCT_NETWORKING_H
|
|
|
|
|
|
|
|
#include <sys/socket.h>
|
2023-05-26 23:52:57 -04:00
|
|
|
#include <lua5.3/lualib.h>
|
2023-05-21 18:47:35 -04:00
|
|
|
|
|
|
|
#define BUFFER_SIZE 1024
|
2023-06-02 08:25:00 -04:00
|
|
|
#define NUM_BUFFERS 10;
|
2023-05-21 18:47:35 -04:00
|
|
|
|
2023-05-22 09:29:35 -04:00
|
|
|
#define OCT_DEFAULT_PORT "20000"
|
|
|
|
|
2023-05-21 18:47:35 -04:00
|
|
|
|
2023-05-26 23:52:57 -04:00
|
|
|
int oct_network_node_init(char* port, lua_State* L);
|
2023-05-26 21:20:13 -04:00
|
|
|
int oct_network_node_deinit();
|
|
|
|
int oct_network_recv_msg();
|
|
|
|
int oct_network_send_msg();
|
2023-05-21 18:47:35 -04:00
|
|
|
|
2023-05-26 23:52:57 -04:00
|
|
|
int oct_network_recv_msg_lua(lua_State* L);
|
|
|
|
int oct_network_send_msg_lua(lua_State* L);
|
|
|
|
|
2023-05-21 18:47:35 -04:00
|
|
|
#endif
|