0

I have ported my C++ application from Linux to Windows which uses Libev. But I get run time error in my code when timer has started in libev code...Sample code as below...

io.set<CHandlerAlwaysOn, &CHandlerAlwaysOn::callback>(this);
io.set(loop);
io.start(sfd,event);
//ev::timer tim;
tim.set<CHandlerAlwaysOn,&CHandlerAlwaysOn::cb_timeout>(this);
tim.set(loop);
tim.start(ntimeout,0.);
ev_run(loop,0);

We are able to accept connections from clients using libev, ev::io. But i get runtime exception when it touches ev::timer code. So my question is can I overcome this problem on Windows? or it is a limitation of Libev on Windows...i.e. it supports only sockets and not timers etc...

1 Answers1

0

Yeah we can use Timers of Libev on Windows also without any changes for the code that is already running successfully on Linux...It was proved in my project which is ported to windows from Linux using C++. The exception that occurred previously in my code is not because of Timers but by using fd's wrongly in send and recv functions of socket programming. Libev is really easy and great library to use for the facilities it supports...