diff --git a/Facepunch.Steamworks/Networking/ConnectionInterface.cs b/Facepunch.Steamworks/Networking/ConnectionInterface.cs index 2d116aa..f59dc6b 100644 --- a/Facepunch.Steamworks/Networking/ConnectionInterface.cs +++ b/Facepunch.Steamworks/Networking/ConnectionInterface.cs @@ -108,7 +108,7 @@ namespace Steamworks // // Releases the message // - msg.Release( msgPtr ); + NetMsg.InternalRelease( (NetMsg*) msgPtr ); } } diff --git a/Facepunch.Steamworks/Networking/NetMsg.cs b/Facepunch.Steamworks/Networking/NetMsg.cs index 6a821d6..8bd0953 100644 --- a/Facepunch.Steamworks/Networking/NetMsg.cs +++ b/Facepunch.Steamworks/Networking/NetMsg.cs @@ -17,17 +17,5 @@ namespace Steamworks.Data internal IntPtr FreeDataPtr; internal IntPtr ReleasePtr; internal int Channel; - - internal delegate void ReleaseDelegate( IntPtr msg ); - - public void Release( IntPtr data ) - { - // - // I think this function might be a static global, so we could probably - // cache this release call. - // - var d = Marshal.GetDelegateForFunctionPointer( ReleasePtr ); - d( data ); - } } } \ No newline at end of file diff --git a/Facepunch.Steamworks/Networking/SocketInterface.cs b/Facepunch.Steamworks/Networking/SocketInterface.cs index 32d0519..73917ac 100644 --- a/Facepunch.Steamworks/Networking/SocketInterface.cs +++ b/Facepunch.Steamworks/Networking/SocketInterface.cs @@ -32,6 +32,10 @@ namespace Steamworks if ( SteamNetworkingSockets.Internal.IsValid ) { SteamNetworkingSockets.Internal.DestroyPollGroup( pollGroup ); + + Console.WriteLine( "Closing Socket!" ); + Console.WriteLine( Socket.ToString() ); + Socket.Close(); } @@ -128,7 +132,7 @@ namespace Steamworks // // Releases the message // - msg.Release( msgPtr ); + NetMsg.InternalRelease( (NetMsg*) msgPtr ); } }