I\'m writing an application that uses boost::asio
. Asio\'s async_receive
(or async_read
) is invariably shown using a boost::bind
The return type of boost::bind is a boost::function. Here's a quick example using a very simple function:
double f(int i, double d) {
cout << "int = " << i << endl;
return d;
}
boost::function bound_func = boost::bind(f, _1, 1.234);
int i = 99;
cout << bound_func(i) << endl;
In your case the function has this type:
boost::function f;