Unverified Commit 8aaaa9a7 authored by Dominik Charousset's avatar Dominik Charousset Committed by GitHub

Merge pull request #896

Add ip_endpoint forward-declaration to fwd.hpp
parents 1e901ed8 fe3bca30
......@@ -185,6 +185,7 @@ enum class stream_priority;
using actor_id = uint64_t;
using binary_serializer = serializer_impl<std::vector<char>>;
using ip_address = ipv6_address;
using ip_endpoint = ipv6_endpoint;
using ip_subnet = ipv6_subnet;
using settings = dictionary<config_value>;
using stream_slot = uint16_t;
......
......@@ -24,23 +24,22 @@
#ifdef CAF_WINDOWS
# include <winsock2.h>
#else
# include <sys/types.h>
# include <sys/socket.h>
# include <sys/types.h>
#endif
using caf::io::network::is_error;
using caf::io::network::ip_endpoint;
using caf::io::network::last_socket_error;
using caf::io::network::native_socket;
using caf::io::network::signed_size_type;
using caf::io::network::socket_size_type;
using caf::io::network::last_socket_error;
using caf::io::network::socket_error_as_string;
using caf::io::network::socket_size_type;
namespace caf {
namespace policy {
bool udp::read_datagram(size_t& result, native_socket fd, void* buf,
size_t buf_len, ip_endpoint& ep) {
size_t buf_len, io::network::ip_endpoint& ep) {
CAF_LOG_TRACE(CAF_ARG(fd));
memset(ep.address(), 0, sizeof(sockaddr_storage));
socket_size_type len = sizeof(sockaddr_storage);
......@@ -64,7 +63,7 @@ bool udp::read_datagram(size_t& result, native_socket fd, void* buf,
}
bool udp::write_datagram(size_t& result, native_socket fd, void* buf,
size_t buf_len, const ip_endpoint& ep) {
size_t buf_len, const io::network::ip_endpoint& ep) {
CAF_LOG_TRACE(CAF_ARG(fd) << CAF_ARG(buf_len));
socket_size_type len = static_cast<socket_size_type>(*ep.clength());
auto sres = ::sendto(fd, reinterpret_cast<io::network::socket_send_ptr>(buf),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment