From 42d47a14c74b83b21b901b1254e391bfc21065f4 Mon Sep 17 00:00:00 2001 From: Garry Newman Date: Thu, 15 Feb 2018 13:46:01 +0000 Subject: [PATCH] Added Networking.CloseSession --- Facepunch.Steamworks/Interfaces/Networking.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Facepunch.Steamworks/Interfaces/Networking.cs b/Facepunch.Steamworks/Interfaces/Networking.cs index f48fefd..ee8bca2 100644 --- a/Facepunch.Steamworks/Interfaces/Networking.cs +++ b/Facepunch.Steamworks/Interfaces/Networking.cs @@ -186,5 +186,14 @@ private unsafe bool ReadP2PPacket( int channel ) return true; } } + + /// + /// This should be called when you're done communicating with a user, as this will free up all of the resources allocated for the connection under-the-hood. + /// If the remote user tries to send data to you again, a new onP2PConnectionRequest callback will be posted. + /// + public bool CloseSession( ulong steamId ) + { + return networking.CloseP2PSessionWithUser( steamId ); + } } }