[ENet-discuss] How can I set the timeouts?
Peter Soxberger
Peter.Soxberger at gmx.net
Wed Oct 29 07:06:59 PDT 2008
Thanks for your answers!
"I wanted to know how I can set the event timeouts (disconnect event(s))?" Does anybody know this?
Thanks!
Peter Soxberger
-------- Original-Nachricht --------
> Datum: Mon, 27 Oct 2008 11:09:39 +0100
> Von: "ingmar wirths" <ingmania at googlemail.com>
> An: "Discussion of the ENet library" <enet-discuss at cubik.org>
> Betreff: Re: [ENet-discuss] How can I set the timeouts?
> 2008/10/25 Bjørn Lindeijer <bjorn at lindeijer.nl>:
> > On 10/24/08, Peter Soxberger <Peter.Soxberger at gmx.net> wrote:
> >> Hi!
> >>
> >> I wanted to know how I can set the event timeouts (disconnect
> event(s))?
> >>
> >> And 2 other small questions:
> >> -Do I need to use enet_packet_destroy or do they destroy on there own
> after some time? Because in the tutorial enet_packet_destroy is not used...
> >
> > Indeed, it's not used in the tutorial and the text reads "A packet is
> > sent to a foreign host with enet_peer_send(). enet_peer_send() accepts
> > a channel id over which to send the packet to a given peer. Once the
> > packet is handed over to ENet with enet_peer_send(), ENet will handle
> > its deallocation and enet_packet_destroy() should not be used upon
> > it."
> >
> > Though in my opinion this should also be noted in the API docs of
> > enet_peer_send, not just in the tutorial. In makes sense though, since
> > otherwise ENet would have to make a copy of the packet since it isn't
> > sent synchronously.
> >
> >> -I want that the client disconnects immediately after using the
> disconnect function but also want that the disconnect event will be called
> immediately (no timeout). Which disconnect function should I use?
> >
> > Hmm, I don't know the answer to this one. I think at least you'll have
> > to wait on the disconnect to be sent away, preferably even waiting
> > until you know the other side got it.
> >
> I observed the same: while a message arrives almost immediately its
> destination on
> my local area network, a disconnect takes severel seconds to be
> realized by the server.
> Thus my guess is that nothing is send to the server, but the
> connection just times out.
> So, whats the point of calling the disconnect function before shutting
> down?
>
> Regards,
> Ingmar
> _______________________________________________
> ENet-discuss mailing list
> ENet-discuss at cubik.org
> http://lists.cubik.org/mailman/listinfo/enet-discuss
--
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser
More information about the ENet-discuss
mailing list