Message4480
Server sockets currently support three options: SO_RCVBUF, SO_REUSEADDR
and SO_TIMEOUT. Atttempts to set other options fail with an exception.
Client sockets have a number of options which are not applicable to
server sockets, e.g. SO_KEEPALIVE, SO_LINGER, SO_OOBINLINE,
SO_REUSEADDR, SO_SNDBUF, and TCP_NODELAY. In some socket
implementations, it is possible to set client-specific options on a
server socket, so that client sockets newly created with accept() can be
configured with (i.e. "inherit") those values. This is not currently
possible on jython.
The attached patch implements such functionality. But the patch contains
no unit tests, and is thus not yet ready for application to the socket
module.
Before the patch can be applied, the following questions must be addressed.
1. Currently java server sockets support SO_RCVBUF (through the
setReceiveBufferSize() method). This option has no meaning for server
sockets, but is used to configure newly 'accept'ed client sockets. Why
does java do this for SO_RCVBUF, but not for SO_SNDBUF?
2. Contrary to other socket implementations, e.g. BSD, Java specifically
does *not* inherit the SO_TIMEOUT value from server sockets to client
sockets. Given the proposed modification, how is an SO_TIMEOUT value set
on a server socket to be interpreted?
- Stick with the java policy, and do NOT inherit the option?
- Implement the BSD policy and inherit the option, even though that
may not be what the user intended?
3. What is the commonly accepted (BSD?) "inheritance policy" for
inheritance of the following client-specific options?
- SO_KEEPALIVE
- SO_LINGER
- SO_OOBINLINE
- SO_REUSEADDR
- SO_SNDBUF
- TCP_NODELAY
- http://www.openldap.org/lists/openldap-bugs/200009/msg00191.html
-
http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.commtechref/doc/commtrf2/setsockopt.htm
These questions need to be answered by
A: Researching how other systems address these issues
B: Finding out what cpython does
C: Finding out what the python community expects |
|
Date |
User |
Action |
Args |
2009-04-08 10:23:27 | amak | set | recipients:
+ amak, pjenvey |
2009-04-08 10:23:27 | amak | set | messageid: <1239186207.29.0.782068323534.issue1309@psf.upfronthosting.co.za> |
2009-04-08 10:23:27 | amak | link | issue1309 messages |
2009-04-08 10:23:26 | amak | create | |
|