Skip to content

adoptSocket: add optional ip parameter#1921

Merged
uNetworkingAB merged 1 commit intouNetworking:masterfrom
BV-WebDev:adoptSocket
Apr 22, 2026
Merged

adoptSocket: add optional ip parameter#1921
uNetworkingAB merged 1 commit intouNetworking:masterfrom
BV-WebDev:adoptSocket

Conversation

@BV-WebDev
Copy link
Copy Markdown
Contributor

@BV-WebDev BV-WebDev commented Apr 2, 2026

Related to uWS.js issue 1257.
Depends on uSockets PR 251.

Update adoptSocket() to accept an optional IP parameter.
Update LocalCluster and addChildApp() to retrieve the IP on pre_open and pass it to adoptSocket().
Allowing the IP to be correctly set in the uSockets open handler for the adopted socket.

If someone accepts external FD, needs the IP on the request and uses the UWS_REMOTE_ADDRESS_USERSPACE cache, they have to pass the IP to adoptSocket().

Comment thread src/App.h Outdated
for the ip to be correctly set in the open handler
@uNetworkingAB uNetworkingAB merged commit a5c26ac into uNetworking:master Apr 22, 2026
@BV-WebDev BV-WebDev deleted the adoptSocket branch April 25, 2026 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants