79 {
82 {
83 try
84 {
85 wlog(
"resolving... ${r}", (
"r", item) );
86 auto eps =
resolve( item.first, item.second );
87 for( auto ep : eps )
88 {
89 wlog(
"sending request to ${ep}", (
"ep",ep) );
90 std::shared_ptr<char> send_buffer(
new char[48], [](
char*
p){
delete[]
p; });
91 std::array<unsigned char, 48> packet_to_send { {010,0,0,0,0,0,0,0,0} };
92 memcpy(send_buffer.get(), packet_to_send.data(), packet_to_send.size());
96 break;
97 }
98 }
99 catch (const fc::canceled_exception&)
100 {
101 throw;
102 }
103 catch ( const std::bad_alloc& )
104 {
105 throw;
106 }
107 catch ( const boost::interprocess::bad_alloc& )
108 {
109 throw;
110 }
111
113 {
115 }
116 catch ( const std::exception& e )
117 {
118 elog(
"${e}", (
"e",e.what() ) );
119 }
120 }
121 }
uint64_t fc_time_point_to_ntp_timestamp(const fc::time_point &fc_timestamp)
Used to generate a useful error report when an exception is thrown.
std::string to_detail_string(log_level ll=log_level::all) const
void send_to(const char *b, size_t l, boost::asio::ip::udp::endpoint &to)
std::vector< boost::asio::ip::udp::endpoint > resolve(boost::asio::io_service &io_service, const std::string &host, uint16_t port)
memcpy((char *) pInfo->slotDescription, s, l)