initial hashmap code
This commit is contained in:
@@ -2,18 +2,17 @@
|
||||
#define __SERVER_H__
|
||||
|
||||
#include <arpa/inet.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <netdb.h>
|
||||
#include <netinet/in.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/epoll.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define PORT 3030
|
||||
#define BACKLOG 10
|
||||
@@ -24,7 +23,9 @@ int start_server(const char *hostname, const char *service);
|
||||
void setup_hints(struct addrinfo *hints, size_t len, const char *hostname);
|
||||
void handle_clients(int sockfd);
|
||||
void epoll_ctl_add(int epfd, int sockfd, uint32_t events);
|
||||
void epoll_ctl_del(int epfd, int sockfd);
|
||||
void setnonblocking(int sockfd);
|
||||
void handle_new_client(int sockfd);
|
||||
int handle_new_client(int sockfd, struct sockaddr_storage *their_sa, socklen_t *theirsa_size);
|
||||
void print_client_ip(struct sockaddr_in *sin);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user