Re: [asio-users] asio::error and std::exception
Brought to you by:
chris_kohlhoff
From: Christopher K. <ch...@ko...> - 2005-12-14 05:01:56
|
Hi Arvid, --- Arvid Norberg <c9...@cs...> wrote: > Hope you don't mind me putting this back in the list. No worries. I should change the list settings to make replies go to the list by default anyway. > I looked into this and I can't understand where you actually > needs the compile-time polymorphism. If I understand > correctly, the native type returned by the data() function on > an endpoint is the same for all endpoints, both udp and tcp. > So, the only reason I can see is that you want it to be > possible to pass both a tcp::endpoint and a udp::endpoint to > the function. Is that correct? No. The ipv4::tcp::endpoint and ipv4::udp::endpoints are the only endpoint types implemented right now, but in the future there could be endpoint types for IPv6 (both for TCP and UDP), UNIX domain sockets, bluetooth, infrared and so on. These can all use different sockaddr* structures. The get_*_endpoint functions need to work with all of these types. What's supported is determined by the operating system you're running on. Cheers, Chris |