Dailydave mailing list archives

Re: Today's Windows Trivia Event


From: Chris Anley <chris () ngssoftware com>
Date: Wed, 30 Mar 2005 17:17:11 +0000

Another solution; use select(), and a non-blocking socket...

i = 1;
ioctlsocket( s, FIONBIO, (unsigned long *)&i );

Then implement the timeout of your choice with select(). If you're banner grabbing, you might want to

setsockopt( s, SOL_SOCKET, SO_RCVTIMEO, ...

to set a recieve timeout. Also, you might want calls to block after the connect, so you can set the socket to blocking again with

i = 0;
ioctlsocket( s, FIONBIO, (unsigned long *)&i );

Probably less tidy than you wanted, but that should work.

     -chris.

Dave Aitel wrote:
Conundrum:
setsockopt(sock,SO_DONOTSUCK);

_______________________________________________
Dailydave mailing list
Dailydave () lists immunitysec com
https://lists.immunitysec.com/mailman/listinfo/dailydave


Current thread: