Repository navigation
listener: ListenConfig::listenSocketFactory - #8976
Conversation
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
|
/assign @mattklein123 @l8huang |
|
@l8huang cannot be assigned to this issue. |
|
/assign @mattklein123 |
|
/assign @l8huang |
|
@l8huang cannot be assigned to this issue. |
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
|
@danzh2010 needs a master merge after my UDP proxy PR. Can you merge master and then I will take a look? /wait |
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
done. PTAL! |
mattklein123
left a comment
There was a problem hiding this comment.
In general this looks great. Flushing out a bunch of random small comments. Thank you!
/wait
Signed-off-by: Dan Zhang <[email protected]>
mattklein123
left a comment
There was a problem hiding this comment.
Thanks, nice work. LGTM with some small comments. cc @euroelessar if you have time to take a quick look.
/wait
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
mattklein123
left a comment
There was a problem hiding this comment.
LGTM modulo a few small nits and sorting out @l8huang's remaining comments.
/wait
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Add ListenSocketFactory interface. Replace ListenConfig::socket() interface with listenSocketFactory() to prepare for SO_REUSEPORT.
The old TcpListenSocket creation is changed to creating a TcpListenSocketFactory which creates a TCP socket during construction in addOrUpdateListener(). This socket factory always provides the same socket when ListenSocketFactory::createListenSocket() is called.
The old UdpListenSocket create is changed to creating a UdpListenSocketFactory in addOrUpdateListener() without creating a UDP socket. The socket will be created when actual UdpListener is created in each worker thread. As currently, we don't support SO_REUSEPORT on UDP socket, createListenSocket() can only be called once.
Risk Level: low, mainly code refactoring, no change to TCP socket creation time.
Testing: existing tests
Part of #8794, #2557