summaryrefslogtreecommitdiffstats
path: root/lib/net/server.h
blob: cf048c312a5d61f7f46d2e26693ce88086f6ca51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#ifndef NET__SERVER_H
#define NET__SERVER_H

#include "./common.h"

typedef struct {
    int listen_socket_fd;
} server_t;

server_t* server_init_tcp(const char* addr, const char* port);
void server_shutdown(server_t* srv);

conn_t* server_try_accept(server_t* srv);

#endif // NET__SERVER_H