Questions tagged [libev]

A full-featured and high-performance event loop that is loosely modelled after libevent, but without its limitations and bugs. It is used, among others, in the GNU Virtual Private Ethernet and rxvt-unicode packages, and in the Deliantra MORPG Server and Client.

A full-featured and high-performance event loop that implements a reactor pattern and event-driven I/O in C. It is loosely modelled after libevent, but without its limitations and bugs

114 questions
1
vote
1 answer

libev, why recv a event's number is 3 in evloop?

void callback(struct ev_loop *loop, ev_io *w, int events) { if (EV_READ == events) { ... } else if (EV_WRITE == events) { ... } else { here recv event's number is 3 } } In libev source code 'ev.h', i had…
QWganker
  • 13
  • 5
1
vote
1 answer

AMQP-CPP RabbitMQ async event based consumer not consuming anything

I'm using the AMQ-CPP library (https://github.com/CopernicaMarketingSoftware/AMQP-CPP) to connect to an existing queue I've created but I'm unable to read anything. I've tested that the queue works using another library…
cabreracanal
  • 924
  • 1
  • 14
  • 36
1
vote
1 answer

Can't install EV cpan module on alpine linux

While this works on debian, alpine refuses to compile (perl 5.20.3 && plenv). Modules instaled => apk update && apk upgrade apk add bash wget curl perl make g++ libev-dev patch git openssl-dev openssl How to explain relevant error from cpanm…
mpapec
  • 50,217
  • 8
  • 67
  • 127
1
vote
1 answer

Xcode: Linking a libev.a static lib failed, showing dylib error

I am working on an OS X application, and planning to use libev as my asyn I/O library. Firstly, I download latest libev package file from official site, extract it, and: # ./configure # make Then I add include/ev.h and .libs/libev.a files to my…
Andrew Chang
  • 1,289
  • 1
  • 18
  • 38
1
vote
0 answers

Feasibility of linking the libev + http server + libtls

I think, I got lost. The problem is that I want to use event-loop based approach to implement simple HTTPS server (TLS 1.x). From what I've read so far, the best candidate to build an event loop is libev and the best candidate nowadays to work with…
Sergei Danielian
  • 4,938
  • 4
  • 36
  • 58
1
vote
1 answer

libev: How to associate custom data with a watcher?

I'm using libev for timers and io events in my Linux 'c' application, and I would like to associate custom data with events. In the libev docs, it alludes to associating custom data but gives no examples. Could someone share how they did their…
Chris Galas
  • 43
  • 1
  • 6
1
vote
0 answers

Porting from poll/epoll to Libev

I am new to libev and I am having hard time understanding it. I have used select(), poll() and epoll() before and they were fairly easy to understand and implement. I now want to switch from epoll to libev. Here is what I am currently doing with…
Denil Vira
  • 25
  • 8
1
vote
1 answer

In libev, why the default loop is on the stack?

int main() { struct ev_loop *loop1 = EV_DEFAULT; struct ev_loop *loop2 = ev_default_loop(0); printf("%ld\n%ld\n", (long)loop1, (long)loop2); return 0; } Yes, loop1 is equal to loop2. But why are they both…
colonel
  • 31
  • 5
1
vote
2 answers

send() failing with EAGAIN after only a few hundred bytes sent

This is happening on Ubuntu 12.04. The same code works fine on OSX. In the logs below you can see that SO_SNDBUF is 20440, and several send()s succeed before failing with EAGAIN. wsmux started on port 8888 send buffer size = 20440 open…
lzm
  • 827
  • 2
  • 11
  • 25
1
vote
1 answer

difference between libevent and libevent-dev

I am wondering as to what are the differences between libevent and libevent-dev. So, I have installed libevent from source (stable version 2.0.21) - and I am not really able to find the sources for libevent-dev. Is libevent-dev not a separate…
AJW
  • 5,569
  • 10
  • 44
  • 57
1
vote
1 answer

libev webserver reading files

When creating a small webserver with libev in C, what is the best strategy to serve files (open, ready, write to socket) without blocking the reactor? I have across some recommendations to read a few blocks at a time but I am not sure this would be…
1
vote
1 answer

c libev undefined reference to `ev_default_loop'

I am running gcc compiler on ubuntu i am using an example to learn how to make a socket connection with libev i have libev4 and libev-dev installed but and everything works fine except when i add struct ev_loop *loop = ev_default_loop(0); its throws…
Keshav Nair
  • 423
  • 1
  • 14
  • 24
1
vote
2 answers

std::list crashes in libev callback

I have a libev write callback function, which checks for pending data to be sent to client. The pending data buffer looks like struct PendingData{ unsigned short data_size; char data[4096]; }; typedef std::list PendingBuf; class…
Vladimir Afinello
  • 1,211
  • 14
  • 16
0
votes
1 answer

What is the right way to publish message to RabbitMq with AMQP-CPP?

I want to use RabbitMq in my c++ program. I desided to use AMQP-CPP for this. When I used class MyConnectionHandler : public AMQP::ConnectionHandler from README file my messages weren't sent. Here is that class #include /** You'll need…
Deadpool
  • 33
  • 7
0
votes
1 answer

SIGINT getting generated in a program using libev

Hi I am dealing with a problem on Mac OS 13.1, while using libev, opening a DLL (libcrypto.3.dylib) and then doing popen to run a shell command and read the ouptut to a string. The scenario in the program is illustrated in the sample as…
Sudheer Hebbale
  • 421
  • 5
  • 11