Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
udp_socket.hpp
Go to the documentation of this file.
1#pragma once
2#include <fc/utility.hpp>
3#include <memory>
4
5#include <boost/asio.hpp>
6
7namespace fc {
8 namespace ip {
9 class endpoint;
10 class address;
11 }
12
17 class udp_socket {
18 public:
19 udp_socket();
22
23 void initialize(boost::asio::io_service &);
24 void open();
25 void send_to(const char* b, size_t l, boost::asio::ip::udp::endpoint &to);
26 void send_to(const std::shared_ptr<const char>& b, size_t l, boost::asio::ip::udp::endpoint &to);
27 void close();
28
29 void set_reuse_address(bool);
30
31 void connect(const boost::asio::ip::udp::endpoint& e);
32 const boost::asio::ip::udp::endpoint local_endpoint() const;
33
34 private:
35 class impl;
36 std::shared_ptr<impl> my;
37 };
38
39}
const boost::asio::ip::udp::endpoint local_endpoint() const
void set_reuse_address(bool)
void send_to(const char *b, size_t l, boost::asio::ip::udp::endpoint &to)
udp_socket(const udp_socket &s)
void connect(const boost::asio::ip::udp::endpoint &e)
void initialize(boost::asio::io_service &)
namespace sysio::chain
Definition authority.cpp:3
char * s
int l