From 9ac9238ddad5750c334542c1b4bacddefc64d9e9 Mon Sep 17 00:00:00 2001 From: Rans4ckeR Date: Fri, 23 Sep 2022 23:22:30 +0200 Subject: [PATCH] Fix net48 build --- DXMainClient/DXGUI/Multiplayer/GameLobby/LANGameLobby.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/DXMainClient/DXGUI/Multiplayer/GameLobby/LANGameLobby.cs b/DXMainClient/DXGUI/Multiplayer/GameLobby/LANGameLobby.cs index 5a07cc871..80b302ceb 100644 --- a/DXMainClient/DXGUI/Multiplayer/GameLobby/LANGameLobby.cs +++ b/DXMainClient/DXGUI/Multiplayer/GameLobby/LANGameLobby.cs @@ -182,7 +182,11 @@ private async Task SendHostPlayerJoinedMessageAsync(CancellationToken cancellati try { client = new Socket(SocketType.Stream, ProtocolType.Tcp); +#if NETFRAMEWORK + await client.ConnectAsync(IPAddress.Loopback, ProgramConstants.LAN_GAME_LOBBY_PORT); +#else await client.ConnectAsync(IPAddress.Loopback, ProgramConstants.LAN_GAME_LOBBY_PORT, cancellationToken); +#endif string message = PLAYER_JOIN_COMMAND + ProgramConstants.LAN_DATA_SEPARATOR + ProgramConstants.PLAYERNAME;