CARLA
Sockets.h
Go to the documentation of this file.
1 // Copyright (c) 2020 Computer Vision Center (CVC) at the Universitat Autonoma
2 // de Barcelona (UAB).
3 //
4 // This work is licensed under the terms of the MIT license.
5 // For a copy, see <https://opensource.org/licenses/MIT>.
6 
7 #pragma once
8 
9 #if _WIN32
10  #include <winsock2.h> ///< socket
11  #include <Ws2tcpip.h>
12 #else
13  #include <sys/socket.h> ///< socket
14  #include <netinet/in.h> ///< sockaddr_in
15  #include <arpa/inet.h> ///< getsockname
16  #include <unistd.h> ///< close
17 #endif
18 
19 #define SOCK_INVALID_INDEX -1