MCPcopy Create free account
hub / github.com/Naios/continuable / main

Function main

examples/example-asio/example-asio.cpp:99–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97};
98
99int main(int, char**) {
100 using asio::ip::udp;
101
102 functional_io_service service;
103
104 service.async_resolve("127.0.0.1", "daytime")
105 .then(
106 [](udp::resolver::iterator iterator) {
107 // ...
108 return *iterator;
109 },
110 service.trough_post())
111 .then([](udp::endpoint /*endpoint*/) {
112 // auto socket = std::make_shared<udp::socket>(service);
113 // socket->async_send_to()
114 })
115 .fail([](cti::exception_t /*error*/) {
116 // ...
117 });
118
119 service.run();
120 return 0;
121}

Callers

nothing calls this directly

Calls 5

failMethod · 0.80
thenMethod · 0.80
async_resolveMethod · 0.80
trough_postMethod · 0.80
runMethod · 0.80

Tested by

no test coverage detected