Questions tagged [libevent]

libevent is an API for writing event driven systems. libevent is written in C and should compile on Linux, *BSD, Mac OS X, Solaris and Windows.

From the Homepage: Libevent

libevent is meant to replace the event loop found in event driven network servers. An application just needs to call event_dispatch() and then add or remove events dynamically without having to change the event loop.

Currently, libevent supports /dev/poll, kqueue(2), event ports, select(2), poll(2) and epoll(4). The internal event mechanism is completely independent of the exposed event API, and a simple update of libevent can provide new functionality without having to redesign the applications. As a result, Libevent allows for portable application development and provides the most scalable event notification mechanism available on an operating system. Libevent can also be used for multi-threaded applications; see Steven Grimm's explanation. Libevent should compile on Linux, *BSD, Mac OS X, Solaris and Windows.

368 questions
0
votes
1 answer

Static compiled error with libevent in Mingw+MSYS

I have written a python script expanded in winxp with mingw+msys compiled. It will call libevent lib. I hope that user don't install more library, so I want to compile it statically, but there are errors. The following is my process to compile and…
simon
  • 569
  • 9
  • 20
0
votes
1 answer

set a deadline for each callback in an event-driven/ event-loop based program

In a typical ASIO or event-based programming library like libevent, is there a way to set a deadline for each callback? I am worried about possible infinite loops within the callbacks. Is there a way to gracefully detect them, remove the misbehaving…
Swaroop
  • 91
  • 4
0
votes
2 answers

Installing gearman on windows 7 through cygwin and get "configure: error: Unable to find libevent"

I'm a newbie trying to install gearman on windows through cygwin using the tutorial here: http://www.phpvs.net/2010/11/30/installing-gearman-and-gearmand-on-windows-with-cygwin/ I need to install gearman to develop on my windows 7 laptop. I've…
frankp221
  • 175
  • 3
  • 11
0
votes
1 answer

Raising and handling events in C

I am porting some C# code (classes mostly) to C. I have analysed the code and the port is definitely possible. One thing I am not sure of though, is how to handle (i.e. implement) raising events in C. I am in a Linux environment, and I expect the…
Homunculus Reticulli
  • 65,167
  • 81
  • 216
  • 341
0
votes
2 answers

Can epoll/libevent/libev work with UDT?

I'm building a high concurrency server which needs to handle tens of thousands of active sockets. I initially used epoll to build a event-based server and it worked well under moderate scale(several thousands of active sockets). But it seems to…
Tony
  • 453
  • 4
  • 7
  • 16
0
votes
1 answer

Array of structs - Array has incomplete element type (in C)

This seems like an easy problem to fix, but i'm doing something wrong. I've been through all the similar threads and didn't find anything that solved my problem, so any help would be appreciated! Basically: C program, and i'm trying to create an…
Chris C
  • 259
  • 2
  • 15
0
votes
1 answer

method for getting correct system path on windows

I have made up a simple http server using libevent. The way the resource (folders in my case) are accessed is http://serverAddress:port/path/to/resouce/ the path to resource is extracted using the decoded url . It works fine on Linux as request…
Vihaan Verma
  • 12,815
  • 19
  • 97
  • 126
0
votes
2 answers

libevent: how to override header includes

I have this include in my code #include which is supposed to include the libevent's header file event.h. But when I see the list of included files it includes this header file Note: including file: C:\Program Files\Microsoft…
Vihaan Verma
  • 12,815
  • 19
  • 97
  • 126
0
votes
0 answers

libevent: query parsing segmentation error

I get segmentation error on trying to parse query obtained from the uri . Here is the pastebin link representing it cleanly.
Vihaan Verma
  • 12,815
  • 19
  • 97
  • 126
0
votes
1 answer

libevent 2.0.19 - strange evbuffer_copyout final simbols

I'm using libevent to do simple POST http server, but i find strange issue - evbuffer_copyout write to *data sended data with overhead (changed every time). As u see in code, i was do fix by cut unnecessary symbols, but it not looks like correct…
user170317
  • 1,152
  • 2
  • 11
  • 22
0
votes
1 answer

Asynchronous HttpClient using libev

I'm writing a web server using libebb (http://tinyclouds.org/libebb/) and libev. I'm looking for an async httpclient that uses the libev event loop. I'd like it to support Http 1.1 (pipelining, keep-alives, etc). I hope this isn't a dumb question.
NafisJamal
  • 227
  • 3
  • 7
0
votes
0 answers

Libevent syncing data on two devices

I'm planning on creating an simple HTTP file transferring server which would sync the data inside a folder between an android tablet and pc. I have recently come to know that Libevent support HTTP apis. Is what I'm planning achievable? Any insights…
Vihaan Verma
  • 12,815
  • 19
  • 97
  • 126
0
votes
1 answer

Trouble with custom libevent package while building hiphop

I'm having trouble building hiphop under Backtrack 5. I have installed all the essentials and apparently the only part that it keeps failing at is the custom libevent package. Here are the commands I'm running in order to build and install…
-1
votes
1 answer

How to manipulate libevent bufferevents outside of callbacks

I use libevent to write client-server application, on client side i want to continiusly wait for intput from console. I tried to run event_base_dispatch in thread, and in main thread ask for input string and add it to bufferevent. std::thread…
Fisteshak
  • 27
  • 4
-1
votes
1 answer

What's the purpose of deferred callbacks in libevent?

According to the libevent book: Deferred callbacks By default, a bufferevent callbacks are executed immediately when the corresponding condition happens. (This is true of evbuffer callbacks too; we’ll get to those later.) This immediate invocation…
xmllmx
  • 39,765
  • 26
  • 162
  • 323
1 2 3
24
25