read event is not getting triggered

Ramana Yarlagadda ramana_yarlagadda at yahoo.com
Thu Jun 26 01:10:16 CEST 2014


Hi,

I am using libev in one of my client software module. Client connects to the server. Server sends some information in response to client request.

One of the problems i am seeing here is client socket Event is not getting triggered when the data is available on the client socket.

I know for sure that the server has sent the information requested by the client. So, just to prove that in a timer callback i called the getdata() on the client socket. The getdata() received data on the client socket.

When we send the kill signal we do receive data or the event call back gets triggered.

Has anybody seen similar issue?  can somebody help me here to find a solution.

Following is the skeleton of the client program.

-thanks in advance
-ramana

       

class Client {
    void run();

private:
    AMQPWrapper ipc_;
    ev::io io_;
    ev::sig sio_;
    ev::timer timer_;
};


Client::run{

    ev::default_loop loop;

    timer_.set<Client, &Client::cb_timerEvent>(this);
    timer_.start(1, 0);

    io_.set<Client, &Client::cb_sockEvent>(this);
    io_.start(ipc_.getSocketFD(), ev::READ);

    sio_.set<&Client::cb_signal>();
    sio_.start(SIGINT);

    sendRequest();


    loop.run(0);
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.schmorp.de/pipermail/libev/attachments/20140625/57d91611/attachment.html>


More information about the libev mailing list