io_interface: return peer address from accept

This commit is contained in:
2026-06-20 09:55:29 +02:00
parent a4714b07e6
commit 638d8073b0
+2 -1
View File
@@ -1309,10 +1309,11 @@ fn netAccept(userdata: ?*anyopaque, listen_handle: net.Socket.Handle, options: n
error.OutOfMemory => return error.SystemResources, error.OutOfMemory => return error.SystemResources,
error.Canceled => return error.Canceled, error.Canceled => return error.Canceled,
}; };
const remote_address = node.remoteAddress(handle) catch return error.SocketNotListening;
return .{ return .{
.handle = handle, .handle = handle,
.address = .{ .ip4 = .unspecified(0) }, .address = nodeAddressToIpAddress(remote_address),
}; };
} }