What is the simplest way to have a udp server in c++ and be able to receive its messages?
Asked
Active
Viewed 1.4k times
1 Answers
9
example: http://www.boost.org/doc/libs/1_45_0/doc/html/boost_asio/example/echo/async_udp_echo_server.cpp

Andriy Tylychko
- 15,967
- 6
- 64
- 112
-
I downloaded the boost zip file, what part of it do I need? I only need the asio part... – nebkat Jan 03 '11 at 17:49
-
almost all boost libraries use some common code for versioning, configuration etc. so you cannot simply extract Asio. to use Asio you need to compile boost.thread and boost.system, the rest is header-only stuff, pls correct me – Andriy Tylychko Jan 03 '11 at 17:55
-
found it http://stackoverflow.com/questions/2629421/how-to-use-boost-in-visual-studio-2010 – nebkat Jan 03 '11 at 17:58
-
2@Neb: you can also use asio without boost, see http://think-async.com/ – Hasturkun Jan 03 '11 at 18:09
-
@Hasturkun that's not entirely accurate, you still need boost installed to use asio. Specifically, linking against `boost-system` is required. – Sam Miller Jan 03 '11 at 20:46
-
1@Sam Miller: It really doesnt, see http://think-async.com/Asio/AsioAndBoostAsio , the non-boost Asio does not have any dependency on Boost, and is a header only implementation – Hasturkun Jan 04 '11 at 07:29