handler.c 386 B

123456789101112131415161718192021
  1. /*
  2. * File: handler.c
  3. * Author: Arthur Brandao
  4. *
  5. * Created on 23 novembre 2018
  6. */
  7. #include <stdio.h>
  8. #include <stdlib.h>
  9. #include "bomberstudent_server.h"
  10. #include "client.h"
  11. #include "handler.h"
  12. void ini_handler(){
  13. add_handler("GET", "client/end", handler_client_end);
  14. }
  15. int handler_client_end(int cliId, JsonParser* json){
  16. remove_client(cliId);
  17. return SUCCESS;
  18. }