Cross-platform, efficient, customizable, and robust asynchronous HTTP(S)/WebSocket server C++ library with the right balance between performance and ease of use
Other
1.15k
stars
93
forks
source link
tls_socket: add #pragma once to avoid redefinition #42
HTTP client includes impl/tls_socket.hpp and the server creates a router with default_tls_traits_t from tls.hpp but the server includes the http.h (client) to perform a client request to send push notifications to android device on a subscribe api entry. This PR fixes this:
In file included from /usr/include/restinio/tls.hpp:12,
from /home/n0t/jami/opendht/include/opendht/dht_proxy_server.h:38,
from /home/n0t/jami/opendht/include/opendht.h:23,
from /home/n0t/jami/opendht/include/opendht/http.h:29,
from /home/n0t/jami/opendht/include/opendht/dht_proxy_client.h:34,
from /home/n0t/jami/opendht/src/dhtrunner.cpp:27:
/usr/include/restinio/impl/tls_socket.hpp:34:7: error: redefinition of ‘class restinio::impl::tls_socket_t’
34 | class tls_socket_t
| ^~~~~~~~~~~~
In file included from /home/n0t/jami/opendht/include/opendht/http.h:28,
from /home/n0t/jami/opendht/include/opendht/dht_proxy_client.h:34,
from /home/n0t/jami/opendht/src/dhtrunner.cpp:27:
/usr/include/restinio/impl/tls_socket.hpp:34:7: note: previous definition of ‘class restinio::impl::tls_socket_t’
34 | class tls_socket_t
| ^~~~~~~~~~~~
In file included from /home/n0t/jami/opendht/include/opendht.h:23,
from /home/n0t/jami/opendht/include/opendht/http.h:29,
from /home/n0t/jami/opendht/include/opendht/dht_proxy_client.h:34,
from /home/n0t/jami/opendht/src/dhtrunner.cpp:27:
HTTP client includes
impl/tls_socket.hpp
and the server creates a router withdefault_tls_traits_t
fromtls.hpp
but the server includes thehttp.h
(client) to perform a client request to send push notifications to android device on a subscribe api entry. This PR fixes this: