From 5028bcb2be79929d877fd43c3232e0fa07f03b45 Mon Sep 17 00:00:00 2001 From: Francois Date: Tue, 21 Nov 2023 19:55:27 +0100 Subject: [PATCH] Update parameter in CreateListenSocketP2PFakeIP calls Changed the first parameter in the CreateListenSocketP2PFakeIP method calls from a static '0' to 'fakePortIndex'. This adjustment enables dynamic assignment of the port index based on the input, enhancing code flexibility and correctness. --- Facepunch.Steamworks/SteamNetworkingSockets.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Facepunch.Steamworks/SteamNetworkingSockets.cs b/Facepunch.Steamworks/SteamNetworkingSockets.cs index 639122f..6645ecb 100644 --- a/Facepunch.Steamworks/SteamNetworkingSockets.cs +++ b/Facepunch.Steamworks/SteamNetworkingSockets.cs @@ -318,7 +318,7 @@ namespace Steamworks options[0].DataType = NetConfigType.Int32; options[0].Value = NetConfig.SendBufferSize; options[0].Int32Value = sendBufferSize; - t.Socket = Internal.CreateListenSocketP2PFakeIP( 0, options.Length, options ); + t.Socket = Internal.CreateListenSocketP2PFakeIP( fakePortIndex, options.Length, options ); t.Initialize(); SetSocketManager( t.Socket.Id, t ); return t; @@ -335,7 +335,7 @@ namespace Steamworks public static SocketManager CreateRelaySocketFakeIP( int fakePortIndex, ISocketManager intrface ) { var options = Array.Empty(); - var socket = Internal.CreateListenSocketP2PFakeIP( 0, options.Length, options ); + var socket = Internal.CreateListenSocketP2PFakeIP( fakePortIndex, options.Length, options ); var t = new SocketManager {