mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-08-30 14:52:51 +08:00
27 lines
431 B
C
27 lines
431 B
C
#ifndef server_h
|
|
#define server_h
|
|
|
|
#include <netinet/in.h>
|
|
|
|
#define BUFFER_SIZE 2400
|
|
|
|
struct Server {
|
|
int domain;
|
|
int port;
|
|
int service;
|
|
int protocol;
|
|
int backlog;
|
|
u_long interface;
|
|
|
|
int socket;
|
|
struct sockaddr_in address;
|
|
|
|
void (*launch)(struct Server *server);
|
|
};
|
|
|
|
struct Server server_Constructor(int port, void (*launch)(struct Server *server));
|
|
void launch(struct Server *server);
|
|
|
|
#endif
|
|
|