io_interface: return peer address from accept
This commit is contained in:
@@ -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),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user