On Sun, 10 May 2009 at 10:53:01 -0400, Dan Winship wrote: > But if you bind() and then connect() (eg, like the rcmd/rsh/rlogin > suite) then maybe you don't want SO_REUSEADDR. (And looking at the glibc > source for rresvport(), it doesn't use SO_REUSEADDR, and instead just > keeps trying different ports at random until it either succeeds or gets > an error other than EADDRINUSE.) I'm not sure if there are use cases for > bind+connect that don't involve prehistoric "authentication" models... Telepathy Tubes (application streams proxied over IM protocols) want this capability, as a way to match clients in the Telepathy API to their localhost<->localhost proxied connection. The intended model is: * A server (say, Vino) is exporting a local TCP socket * An IM contact (say, Alice) connects to the Telepathy Connection Manager via whatever IM protocol * The Telepathy CM calls socket() and bind(), and gets a socket listening on an arbitrary port (say, 54321) * The Telepathy CM tells Vino via D-Bus "I'm about to connect to you on Alice's behalf, the connection will come from 127.0.0.1:54321" * The Telepathy CM actually makes the promised TCP connection * Vino can match the TCP connection to the D-Bus announcement and identify it in its UI as being from Alice (e.g. put Alice's name, avatar or hackergotchi next to her cursor, in the glorious multi-pointer X future) * Alice's VNC protocol data doesn't go via the D-Bus session bus So the Telepathy project would appreciate it if you don't break the ability to do this! Regards, Simon
Attachment:
signature.asc
Description: Digital signature