cs-3516-assignment-1/server/socket_server.h

16 lines
294 B
C
Raw Normal View History

#ifndef SOCKET_SERVER
#define SOCKET_SERVER
#define BACKLOG_SIZE 8;
enum server_status {STATUS_LISTENING, STATUS_CLOSED, STATUS_ERROR};
struct server_info {
int sock_fd;
enum server_status status;
};
struct server_info setup(int port);
char *serve(struct server_info *info);
#endif