summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2021-08-15 15:58:44 +0200
committerAki <please@ignore.pl>2021-08-15 15:58:44 +0200
commita0473749524261367d91cee981d76e099bac6f83 (patch)
tree87cc608443f4cef5b6c7ec106f6a8b2a4cd50a6b
parentc05d5a9faa363ee68776ec621d8c2cb86e3b9e24 (diff)
downloadplop-a0473749524261367d91cee981d76e099bac6f83.zip
plop-a0473749524261367d91cee981d76e099bac6f83.tar.gz
plop-a0473749524261367d91cee981d76e099bac6f83.tar.bz2
Renamed plop_make_server to open_server
-rw-r--r--main.c2
-rw-r--r--plop.c2
-rw-r--r--plop.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/main.c b/main.c
index bc4993d..950aa03 100644
--- a/main.c
+++ b/main.c
@@ -79,7 +79,7 @@ int main(int argc, char ** argv)
struct epoll_event e;
e.events = EPOLLIN;
e.data.ptr = NULL; // TODO: Consider putting server's Lua state in here?
- const int server = plop_make_server(NULL, service); // TODO: Check server's fd before ctl?
+ const int server = open_server(NULL, service); // TODO: Check server's fd before ctl?
if (-1 == epoll_ctl(efd, EPOLL_CTL_ADD, server, &e))
{
diff --git a/plop.c b/plop.c
index 9b6d8f5..ee24634 100644
--- a/plop.c
+++ b/plop.c
@@ -40,7 +40,7 @@ lua_State * plop_initialize_lua(void)
/// \return File descriptor of the socket or -1 in case of an error
/// \see getaddrinfo(3)
// TODO: Handle UNIX sockets
-int plop_make_server(const char * node, const char * service)
+int open_server(const char * node, const char * service)
{
struct addrinfo hints = {
.ai_family = AF_UNSPEC,
diff --git a/plop.h b/plop.h
index 5735685..f3a1fe0 100644
--- a/plop.h
+++ b/plop.h
@@ -5,7 +5,7 @@
#include <lua.h>
lua_State * plop_initialize_lua(void);
-int plop_make_server(const char *, const char *);
+int open_server(const char *, const char *);
int plop_load_handler(lua_State *, const char *);
int plop_handle_client(lua_State *, struct epoll_event *);
int plop_handle_server(lua_State *, const int, const int);