Re: [gnet] connection with timeout



Axel Bock <news-and-lists the-me de> writes:

> Hi all, 
> 
> is anyone here who has implemented a connection request with a timeout?
> So that the program tries to connect some host for - say - three
> seconds, and if he has no connection after this time aborts and returns?
> This is very useful for me cause I have to connect some firewalled hosts
> who just drop the packets, so I have to wait for the tcp timers to go
> out!
> 
Use the acync connection function (there is an example, grep the
sources) and a timer in your main loop.

HTH, Andy
-- 
Andreas Rottmann         | Dru ICQ        | 118634484 ICQ | a rottmann gmx at
http://www.8ung.at/rotty | GnuPG Key: http://www.8ung.at/rotty/gpg.asc
Fingerprint              | DFB4 4EB4 78A4 5EEE 6219  F228 F92F CFC5 01FD 5B62



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]