Blame view

Librairies/Exemple/Network/libnet.h 629 Bytes
0ae69087   pfrison   Ajout des fichiers
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
  #ifndef LIBNET_H
  #define LIBNET_H
  
  #include <stdint.h>
  
  int sendUDPBroadcast(unsigned char *message, int taille_message, int port);
  int sendUDPUnicast(char *address, unsigned char *message, int taille_message, int port);
  
  int initialisationServeurTCP(char *service);
  int boucleServeurTCP(int socket, void (*traitement)(int, char *));
  
  int initialisationServeurUDP(char *service);
  int boucleServeurUDP(int s, void (*traitement)(unsigned char *, int, char *));
  
  int openTCPClient(char *hote, int port);
  void sendTCP(int socket, char *message, int length_message);
  int receiveTCP(int socket, char *message, int max_length);
  
  #endif