Re: [Libevent-users] Adding ipv6 support.

2011-02-07 Thread William Ahern
On Mon, Feb 07, 2011 at 12:47:03PM -0800, William Ahern wrote: > On Mon, Feb 07, 2011 at 02:40:03PM -0500, Simon Perreault wrote: > > On 2011-02-07 14:09, William Ahern wrote: > > >> Furthermore, you're ignoring alignment issues. > > > > > > There are no alignment issues here, arguably not even if

Re: [Libevent-users] Libevent edge trigger support for udp in Solaris

2011-02-07 Thread Rita Sarathy
Thank you Nick. Sarita On Mon, Feb 7, 2011 at 9:27 AM, Nick Mathewson wrote: > On Fri, Feb 4, 2011 at 9:52 PM, Sarita Sarathy wrote: >> >> Hi, > > > Hello, Sarita!  The libevent-users mailing list isn't at monkey.org > any more; see http://archives.seul.org/libevent/users/ for info on > subscri

[Libevent-users] detected a bad network connection for a TCP connection

2011-02-07 Thread Ivan Novick
Hello, I am testing fault tolerance in my application that is written using libevent-1.4.6 The application has a client and server connecting over TCP and the event is setup like this on the client: event_set(event, sock, EV_READ | EV_PERSIST, recv_from_server, h); Then I login to the server a

Re: [Libevent-users] Read callback problem

2011-02-07 Thread Gordiychuck Oleg
Thank you, exactly what i need ! :) *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] Adding ipv6 support.

2011-02-07 Thread William Ahern
On Mon, Feb 07, 2011 at 02:40:03PM -0500, Simon Perreault wrote: > On 2011-02-07 14:09, William Ahern wrote: > >> Furthermore, you're ignoring alignment issues. > > > > There are no alignment issues here, arguably not even if we're talking pure > > standard C. Certainly not in any implementation t

Re: [Libevent-users] Adding ipv6 support.

2011-02-07 Thread Simon Perreault
On 2011-02-07 14:09, William Ahern wrote: >> Furthermore, you're ignoring alignment issues. > > There are no alignment issues here, arguably not even if we're talking pure > standard C. Certainly not in any implementation that supports the BSD > sockets API and the .sa_family member overlay. It s

Re: [Libevent-users] Adding ipv6 support.

2011-02-07 Thread William Ahern
On Mon, Feb 07, 2011 at 01:02:42PM -0500, Simon Perreault wrote: > On 2011-02-07 12:53, Dave Hart wrote: > > If you only care about IPv4 and IPv6 sockets, consider using a union > > of the useful types: > > > > typedef struct union_saddr_tag { > > struct sockaddrsa; > > struct

Re: [Libevent-users] Adding ipv6 support.

2011-02-07 Thread Evan Jones
On Feb 7, 2011, at 13:02 , Simon Perreault wrote: Furthermore, you're ignoring alignment issues. What potential alignment problem can occur with the union that Dave proposes? My understanding is that C compilers will ensure that the union is aligned to the largest member, so my understandin

Re: [Libevent-users] Adding ipv6 support.

2011-02-07 Thread Tommy van Leeuwen
On Mon, Feb 7, 2011 at 12:58 PM, Ron Arts wrote: > hi, > > I have an application where I need to add ipv6 support. > Does a recipe exist, or example code how to convert > an existing libevent application? This helped me a lot on porting my ipv4 apps to ipv6: http://www.akkadia.org/drepper/userap

Re: [Libevent-users] Read callback problem

2011-02-07 Thread Nick Mathewson
2011/2/6 Gordiychuck Oleg : > > > Начало переадресованного сообщения: > > От: Gordiychuck Oleg > Дата: 7 лютого 2011 р. 00:04:43 GMT+02:00 > Кому: majord...@freehaven.net > Тема: Read callback problem > > Hello! > > I have a simple network application with simple protocol over TCP\IP. The > main i

Re: [Libevent-users] Adding ipv6 support.

2011-02-07 Thread Simon Perreault
On 2011-02-07 12:53, Dave Hart wrote: > If you only care about IPv4 and IPv6 sockets, consider using a union > of the useful types: > > typedef struct union_saddr_tag { > struct sockaddrsa; > struct sockaddr_in sin; > struct sockaddr_in6 sin6; > } union_saddr; >

Re: [Libevent-users] Adding ipv6 support.

2011-02-07 Thread Dave Hart
On Mon, Feb 7, 2011 at 17:53 UTC, Dave Hart wrote: > If you only care about IPv4 and IPv6 sockets, consider using a union > of the useful types: > > typedef struct union_saddr_tag { typedef union union_saddr_tag { ... Not enough coffee. Running the microwave to reheat it irritates my 2.5 GHz wi

Re: [Libevent-users] Adding ipv6 support.

2011-02-07 Thread Dave Hart
Frank's advice is a great overview of how to approach the problem. sockaddr_storage provides enough storage space for any platform-supported socket family, but in some cases I've found it to be too generous, much larger than sockaddr_in6, the largest I care about. Also, I don't like the typical ca

Re: [Libevent-users] Libevent edge trigger support for udp in Solaris

2011-02-07 Thread Nick Mathewson
On Fri, Feb 4, 2011 at 9:52 PM, Sarita Sarathy wrote: > > Hi, Hello, Sarita! The libevent-users mailing list isn't at monkey.org any more; see http://archives.seul.org/libevent/users/ for info on subscribing to the current location. > We would like to use UDP connections asynchronously in Sola

Re: [Libevent-users] Adding ipv6 support.

2011-02-07 Thread Frank Denis
Hi Ron, Le Mon, Feb 07, 2011 at 12:58:47PM +0100, Ron Arts ecrivait : > I have an application where I need to add ipv6 support. > Does a recipe exist, or example code how to convert > an existing libevent application? Libevent does support IPv6 for a long time, possibly since the very first p

[Libevent-users] Adding ipv6 support.

2011-02-07 Thread Ron Arts
hi, I have an application where I need to add ipv6 support. Does a recipe exist, or example code how to convert an existing libevent application? thanks, Ron *** To unsubscribe, send an e-mail to majord...@freehaven.net with uns

Re: [Libevent-users] Read callback problem

2011-02-07 Thread Gordiychuck Oleg
Hello! My send function is next: static void WriteNeighbor(Neighbor *neighbor, unsigned int size, uint8_t *data) { uint8_t pre_data[4]; Utils::put_be32(pre_data, command); if (bufferevent_write(neighbor->bev,pre_data,4)==-1) ErrorFactory::Die(Errors::Write