bomberstudent_server.h 678 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * File: bomberstudent_server.h
  3. * Author: Arthur Brandao
  4. *
  5. * Created on 14 novembre 2018
  6. */
  7. #ifndef BOMBERSTUDENT_SERVER_H
  8. #define BOMBERSTUDENT_SERVER_H
  9. /* --- Include --- */
  10. #include "constante.h"
  11. #include "server.h"
  12. #include "json.h"
  13. #include "client.h"
  14. /* --- Constantes --- */
  15. #define PORT_UDP 18624
  16. #define PORT_TCP 18642
  17. /* --- Fonctions --- */
  18. void ini_server();
  19. void add_handler(char*, char*, int(*)(int, JsonParser*));
  20. boolean launch_udp_server(int);
  21. boolean launch_tcp_server(int);
  22. boolean receive_client(Client*);
  23. boolean send_client(int, JsonEncoder*);
  24. boolean notify_client(Client*, char*, char*, JsonEncoder*);
  25. #endif /* BOMBERSTUDENT_SERVER_H */