Commit 0fc42337 authored by Jakob Otto's avatar Jakob Otto

Fix formatting

parent f6a1f0c3
......@@ -114,9 +114,8 @@ variant<size_t, sec> write(udp_datagram_socket x, span<const byte> buf,
ip_endpoint ep) {
sockaddr_storage addr = {};
detail::convert(ep, addr);
auto len = static_cast<socklen_t>(ep.address().embeds_v4()
? sizeof(sockaddr_in)
: sizeof(sockaddr_in6));
auto len = static_cast<socklen_t>(
ep.address().embeds_v4() ? sizeof(sockaddr_in) : sizeof(sockaddr_in6));
auto res = ::sendto(x.id, reinterpret_cast<socket_send_ptr>(buf.data()),
buf.size(), 0, reinterpret_cast<sockaddr*>(&addr), len);
auto ret = check_udp_datagram_socket_io_res(res);
......
......@@ -23,12 +23,12 @@
#include "caf/test/dsl.hpp"
#include <deque>
#include <vector>
#include <numeric>
#include <vector>
#include "caf/binary_serializer.hpp"
#include "caf/byte.hpp"
#include "caf/byte_buffer.hpp"
#include "caf/binary_serializer.hpp"
#include "caf/detail/network_order.hpp"
#include "caf/span.hpp"
#include "caf/tag/message_oriented.hpp"
......@@ -71,7 +71,6 @@ struct ul_expect_messages {
/// lower layer: offer stream for message parsing
template <class UpperLayer>
struct ll_provide_stream_for_messages {
using output_tag = tag::stream_oriented;
void set_expectations(std::vector<byte> data,
......@@ -141,8 +140,7 @@ void encode_message(std::vector<byte>& data, const byte_buffer& message) {
struct fixture {
using test_layers = ll_provide_stream_for_messages<
net::length_prefix_framing<
ul_expect_messages>>;
net::length_prefix_framing<ul_expect_messages>>;
void generate_messages(size_t num, size_t factor = 10) {
for (size_t n = 1; n <= num; n += 1) {
......
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