|
determining an endpoint's family - endpoint_type/protocol_type?: msg#00018lib.boost.asio.user
I am developing an FTP client with boost::asio, and I wish to determine whether an endpoint (generated by a resolver) is IPv4 or IPv6. The only way I can see how is to compare endpoint.protocol().family() with AF_INET and AF_INET6, which doesn't feel like the right way. An alternative would be to specify the desired family before the host is resolved, or to simply compare the endpoint's family against some predefined boost::asio::ip::ipv6/ipv4 members. The difference between IPv4 and IPv6 is quite significant for FTP, as they require a different set of (mostly incompatible) commands to negotiate data connections. Any suggestions? (Probably I have missed something :) Richard ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: stalls with concurrent host name resolvers: 00018, Arvid Norberg |
|---|---|
| Next by Date: | Re: determining an endpoint's family - endpoint_type/protocol_type?: 00018, Christopher Kohlhoff |
| Previous by Thread: | Link error with CVS code for MSVC-8.0 x64 buildsi: 00018, Eoin |
| Next by Thread: | Re: determining an endpoint's family - endpoint_type/protocol_type?: 00018, Christopher Kohlhoff |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |