On linux and solaris SO_RCVTIMEO and SO_SNDTIMEO needs the timeout to be set
in a timeval struct and not a DWORD.

Saju
-----Original Message-----
From: owner-openssl-us...@openssl.org
[mailto:owner-openssl-us...@openssl.org] On Behalf Of Adam Grossman
Sent: Sunday, April 04, 2010 4:40 PM
To: openssl-users@openssl.org
Subject: RE: setting an SSL_accept(...) timeout

i have done networking programming for a while, and i have never run
across that before.  thank you so much, you have just saved me a lot of
development time!

-=- adam grossman

On Sun, 2010-04-04 at 22:34 +0200, PMHager wrote:
> Adam Grossman wrote:
> > thanks for the info, but this is on linux.
> 
> The socket interface is almost the same on linux:
> 
> #include <sys/socket.h> 
> 
> int  hSocket;
> int  dwTimeout=1000; // milliseconds
> 
> setsockopt(hSocket,SOL_SOCKET,SO_RCVTIMEO,(void*)&dwTimeout,sizeof
dwTimeout);
> setsockopt(hSocket,SOL_SOCKET,SO_SNDTIMEO,(void*)&dwTimeout,sizeof
dwTimeout); 
> 
> [http://linux.die.net/man/3/setsockopt]
> 
> Peter-Michael
> 
> --
> 
> Peter-Michael Hager - acm senior - HAGER-ELECTRONICS GmbH - Germany
> 
> 
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> User Support Mailing List                    openssl-users@openssl.org
> Automated List Manager                           majord...@openssl.org


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 9.0.800 / Virus Database: 271.1.1/2789 - Release Date: 04/04/10
02:32:00

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to