My project was compiling and executing, but I get an error now. I'm not sitting at my desk right now, but I think it said "Incorrect parameters" when I examine the error. Here's the offending code:
boost::asio::io_service io_service;
using boost::asio::ip::udp;
udp::socket s(io_service, udp::endpoint(udp::v4(), 0));
udp::resolver resolver(io_service);
udp::resolver::query query(udp::v4(), "127.0.0.1", 606);
try
{
udp::resolver::iterator iterator = resolver.resolve(query);
s.send_to(boost::asio::buffer(buffer, size), *iterator);
}
catch ( std::exception& e )
{
std::cout << e.what() << std::endl;
}
The first line in the try block is what causes the exception. I thought I backed out all my changes, but I still can't get it to work. Can somebody tell me what obvious dumb mistake I made?