blob: c7d4df9ec42292300566e6bd4e4b6389b7e2e92a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#ifndef MY_SERVER
#define MY_SERVER
#include "list.h"
#include "tux.h"
#include "buffer.h"
#include "tcp.h"
#include "udp.h"
typedef struct client_struct
{
sock_tcp_t *socket_tcp;
sock_udp_t *socket_udp;
int status;
tux_t *tux;
buffer_t *buffer;
} client_t;
int initTcpServer(int port);
int initUdpServer(int port);
client_t* newTcpClient(sock_tcp_t *sock_tcp);
client_t* newUdpClient(sock_udp_t *sock_udp);
void destroyClient(client_t *p);
void sendClient(client_t *p, char *msg);
void sendAllClientBut(char *msg, client_t *p);
void sendAllClient(char *msg);
void eventClientListBuffer();
void selectServerTcpSocket();
void selectServerUdpSocket();
void quitTcpServer();
void quitUdpServer();
#endif
|