27 lines
613 B
C++
27 lines
613 B
C++
//# include <iostream>
|
|
# include <string>
|
|
# include <map>
|
|
# include <cerrno> // errno
|
|
# include <cstdio> // perror
|
|
# include <exception>
|
|
# include <stdexcept>
|
|
# include <unistd.h> // close
|
|
|
|
// --------------------------------------------
|
|
// Verifier si les fonctions sont dispos dans des headers C++
|
|
|
|
|
|
# include <fcntl.h> // fcntl
|
|
|
|
// htonl, htons, ntohl, ntohs, inet_addr
|
|
# include <arpa/inet.h>
|
|
|
|
// socket, accept, listen, send, recv, bind, connect, setsockopt, getsockname
|
|
# include <sys/socket.h>
|
|
|
|
# include <poll.h> // poll
|
|
// OR
|
|
# include <sys/select.h> // select
|
|
// OR
|
|
# include <sys/epoll.h> // epoll
|