Re: [Libevent-users] bufferevent and threads

2010-11-16 Thread Christophe ZBIERSKI
Hi, I found and solved my problem. I just added 'evthread_use_pthreads();' before 'event_base_dispatch(base);' and 'BEV_OPT_THREADSAFE' > bev = bufferevent_socket_new(base, newsock, BEV_OPT_CLOSE_ON_FREE|BEV_OPT_THREADSAFE); Bye. Le 04/11/2010 14:46, Christophe ZBIERSKI a écrit : > Hello, > > I m

[Libevent-users] bufferevent and threads

2010-11-04 Thread Christophe ZBIERSKI
Hello, I made a daemon that receives data from a socket, data is read from callback (readcb) : > bufferevent_setcb(bev, readcb, NULL, eventcb, conndata); then it is given to a thread (because the treatment can be long). Then this is the thread that writes the result of the treatment on the sock