[Libevent-users] Enable/disable write callback for UDP

2013-04-20 Thread Jan Danielsson
Hello, I'm doing this (roughly): --- udp_sock = create_udo4_any_socket(""); evutil_make_socket_nonblocking(udp_sock); udp_event = event_new(base, udp_sock, EV_READ|EV_WRITE|EV_PERSIST, proc_udp_packet, (void*)base); event_add(udp_event, NULL); --

Re: [Libevent-users] Enable/disable write callback for UDP

2013-04-20 Thread Nick Mathewson
On Sat, Apr 20, 2013 at 3:36 PM, Jan Danielsson wrote: > Hello, > >I'm doing this (roughly): > >--- >udp_sock = create_udo4_any_socket(""); >evutil_make_socket_nonblocking(udp_sock); >udp_event = event_new(base, udp_sock, EV_READ|EV_WRITE|EV_PERSIST, > pro

[Libevent-users] TCP client not calling writecb

2013-04-20 Thread Jan Danielsson
Hello, I have a server which waits for incoming connections, and I want the client to connect to the server, and immediately send over a port number. In the client's main() I do this: (void)memset(&sin, 0, sizeof(sin)); sin.sin_fam

Re: [Libevent-users] TCP client not calling writecb

2013-04-20 Thread Nir Soffer
On Apr 21, 2013, at 1:28 AM, Jan Danielsson wrote: > Hello, > > I have a server which waits for incoming connections, and I want the > client to connect to the server, and immediately send over a port > number. In the client's main() I do this: > > ---

Re: [Libevent-users] Enable/disable write callback for UDP

2013-04-20 Thread Andrew Danforth
This is probably unnecessary. UDP sockets are always writeable. On Apr 20, 2013, at 3:36 PM, Jan Danielsson wrote: > Hello, > > I'm doing this (roughly): > > --- > udp_sock = create_udo4_any_socket(""); > evutil_make_socket_nonblocking(udp_sock); > udp_event = event_

[Libevent-users] Tricky bug when using libevhtp/libevent-openssl

2013-04-20 Thread JiaQiang Xu
Hi, I'm writing a http server with libevhtp and libevent-openssl. I met an assert failure after responsing to some GET requests. The trace back looks like (gdb) bt #0 0x7f5185578425 in raise () from /lib/x86_64-linux-gnu/libc.so.6 #1 0x7f518557bb8b in abort () from /lib/x86_64-linux-gn