GuinnessServer/tools.h

21 lines
557 B
C
Raw Normal View History

2020-03-28 09:57:02 +01:00
/*
* tools
2020-04-14 23:41:07 +02:00
* Creation et manipulation de sockets
2020-03-28 09:57:02 +01:00
* Thomas Nemeth -- le 15 juin 2001
*
*/
#ifndef SOCKETS_TOOLS
#define SOCKETS_TOOLS
#include <netinet/in.h>
int ouvre_socket (int port, char *adr_ip, struct sockaddr_in *ptr_adresse);
int connect_server (const char *machine, int port);
int install_server (int port, char *adr_ip, struct sockaddr_in *ptr_adresse);
int read_infos (int socket_data, char *infos);
int send_infos (int socket_data, const char *infos);
void get_sock_infos (int sock, char **nom, char **adr, int *prl, int *prd);
#endif