Hello, why this code doesn't work. Poll loop doesn't start.
// ------------------- Code -----------------
#include <ev++.h>
#include <stdio.h>
using namespace ev;
void io_cb (ev::io &w, int revents);
class myclass
{
public:
ev::io iow;
myclass (int fd)
{
iow.set <myclass, &myclass::io_cb> (this);
iow.start (fd, ev::WRITE | ev::READ);
}
void io_cb (ev::io &w, int revents) {
puts("test");
}
};
int main( int /*argc*/, char** /*argv*/ )
{
myclass *obj = new myclass(fileno(stdin));
return 0;
}
// --------------------- EOF -----------------------
Thanks.
_______________________________________________
libev mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev