[Python-bugs-list] [ python-Bugs-701936 ] getsockopt/setsockopt with SO_RCVTIMEO are inconsistent

SourceForge.net noreply@sourceforge.net
Tue, 11 Mar 2003 18:54:49 -0800


Bugs item #701936, was opened at 2003-03-12 02:54
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=701936&group_id=5470

Category: Python Library
Group: Python 2.2.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Gary Donovan (gazzadee)
Assigned to: Nobody/Anonymous (nobody)
Summary: getsockopt/setsockopt with SO_RCVTIMEO are inconsistent

Initial Comment:
The SO_RCVTIMEO option to getsockopt/setsockopt seems
to vary it's parameter format when used under Linux.

With setsockopt, the parameter seems to be a struct of
{long seconds, long microseconds}, as you would expect
since it's modelling a C "struct timeval".

However, with getsockopt, the parameter format seems to
be {long seconds, long milliseconds} --- ie. it uses
milliseconds rather than microseconds.

The attached python script demonstrates this problem.

Am I doing something crucially wrong, or is this meant
to happen, or ... ?

What I'm using:
Python 2.2.2 (#1, Feb 24 2003, 17:36:09)
[GCC 3.0.4 (Mandrake Linux 8.2 3.0.4-2mdk)] on linux2


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=701936&group_id=5470