lunp
 Tutto Strutture dati File Funzioni Variabili Ridefinizioni di tipo (typedef) Tipi enumerati (enum) Valori del tipo enumerato Definizioni
mytcpserver.h
Vai alla documentazione di questo file.
1 
5 #ifndef __mytcpserver_h
6 #define __mytcpserver_h
7 
11 typedef void (*myTcpServerChildTask)(SOCKET sockfd);
12 
18 
24 SOCKET myTcpServerAccept(SOCKET sockfd, struct sockaddr_in *clientStruct);
25 
30 SOCKET myTcpServerStartup(const char *serverPort);
31 
37 void myTcpServerSimple(SOCKET sockfd, myTcpServerChildTask childTask);
38 
44 void myTcpServerOCPC(SOCKET sockfd, myTcpServerChildTask childTask);
45 
52 void myTcpServerOCPCMax(SOCKET sockfd, int maxChildCount, myTcpServerChildTask childTask);
53 
60 void myTcpServerPreforked(SOCKET sockfd, int childCount, myTcpServerChildTask childTask);
61 
68 void myTcpServerMixed(SOCKET sockfd, int minChildCount, myTcpServerChildTask childTask);
69 
77 void myTcpServerMixedMax(SOCKET sockfd, int minChildCount, int maxChildCount, myTcpServerChildTask childTask);
78 
85 void myTcpServerSelect(SOCKET sockfd, int maxChildCount, myTcpServerSelectChildTask childTask);
86 
87 #endif
int SOCKET
Definition: mylunp.h:8
void myTcpServerSimple(SOCKET sockfd, myTcpServerChildTask childTask)
Implementa un server TCP che serve un client per volta.
Definition: mytcpserver.c:48
void myTcpServerPreforked(SOCKET sockfd, int childCount, myTcpServerChildTask childTask)
Implementa un server TCP che serve fino a childCount client tramite il pre-fork di childCount process...
Definition: mytcpserver.c:75
SOCKET myTcpServerAccept(SOCKET sockfd, struct sockaddr_in *clientStruct)
Accetta una connessione sul socket TCP specificato.
Definition: mytcpserver.c:18
bool(* myTcpServerSelectChildTask)(SOCKET sockfd)
La funzione che viene chiamata dalla funzione myTcpServerSelect ogni volta che un client si connette ...
Definition: mytcpserver.h:17
void myTcpServerMixedMax(SOCKET sockfd, int minChildCount, int maxChildCount, myTcpServerChildTask childTask)
Implementa un server TCP che serve fino a maxChildCount client tramite il pre-fork di minChildCount p...
Definition: mytcpserver.c:88
bool
Definition: mylunp.h:10
void myTcpServerMixed(SOCKET sockfd, int minChildCount, myTcpServerChildTask childTask)
Implementa un server TCP che serve più client tramite il pre-fork di minChildCount processi figlio...
Definition: mytcpserver.c:82
void myTcpServerSelect(SOCKET sockfd, int maxChildCount, myTcpServerSelectChildTask childTask)
Implementa un server TCP che serve fino a maxChildCount client nello stesso processo.
Definition: mytcpserver.c:94
void myTcpServerOCPCMax(SOCKET sockfd, int maxChildCount, myTcpServerChildTask childTask)
Implementa un server TCP che serve fino a maxChildCount client tramite il fork di più processi figlio...
Definition: mytcpserver.c:71
void myTcpServerOCPC(SOCKET sockfd, myTcpServerChildTask childTask)
Implementa un server TCP che serve più client tramite il fork di più processi figlio, uno per client.
Definition: mytcpserver.c:67
void(* myTcpServerChildTask)(SOCKET sockfd)
La funzione che viene chiamata dalle funzioni myTcpServerXxx ogni volta che un client si connette al ...
Definition: mytcpserver.h:11
SOCKET myTcpServerStartup(const char *serverPort)
Crea un socket TCP associato alla porta specificata.
Definition: mytcpserver.c:44