Support adding an established SOCK_STREAM connection to the reactor
|Reported by:||Jean-Paul Calderone||Owned by:||therve|
branch-diff, diff-cov, branch-cov, buildbot
Description (last modified by )
Certain multi-process models want to be able to move established connections (TCP, UNIX, whatever) between processes. There aren't any public APIs for this now, so we should add one.
IReactorSocket.adoptStreamPort. We should also add
IReactorSocket.addConnection. It would have a similar signature to
adopStreamPort (but likely without the
socketType argument, since it would always have to be
SOCK_STREAM) , but treat the file descriptor as a
SOCK_STREAM socket which is already connected to a peer. The reactor would do whatever necessary to start processing events from that socket, just as it would do for a socket it accepted internally from a port it was managing.
See also #4387.
Change History (15)
comment:14 Changed 5 years ago by
|Branch:||branches/reactor-adopt-connection-5570 → branches/reactor-adopt-connection-5570-2|