mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-01-28 06:28:08 +03:00
NetMsg uses the flat function to release
This commit is contained in:
parent
afd314627d
commit
3c8a2f6cd1
@ -108,7 +108,7 @@ namespace Steamworks
|
|||||||
//
|
//
|
||||||
// Releases the message
|
// Releases the message
|
||||||
//
|
//
|
||||||
msg.Release( msgPtr );
|
NetMsg.InternalRelease( (NetMsg*) msgPtr );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,17 +17,5 @@ namespace Steamworks.Data
|
|||||||
internal IntPtr FreeDataPtr;
|
internal IntPtr FreeDataPtr;
|
||||||
internal IntPtr ReleasePtr;
|
internal IntPtr ReleasePtr;
|
||||||
internal int Channel;
|
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<ReleaseDelegate>( ReleasePtr );
|
|
||||||
d( data );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -32,6 +32,10 @@ namespace Steamworks
|
|||||||
if ( SteamNetworkingSockets.Internal.IsValid )
|
if ( SteamNetworkingSockets.Internal.IsValid )
|
||||||
{
|
{
|
||||||
SteamNetworkingSockets.Internal.DestroyPollGroup( pollGroup );
|
SteamNetworkingSockets.Internal.DestroyPollGroup( pollGroup );
|
||||||
|
|
||||||
|
Console.WriteLine( "Closing Socket!" );
|
||||||
|
Console.WriteLine( Socket.ToString() );
|
||||||
|
|
||||||
Socket.Close();
|
Socket.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -128,7 +132,7 @@ namespace Steamworks
|
|||||||
//
|
//
|
||||||
// Releases the message
|
// Releases the message
|
||||||
//
|
//
|
||||||
msg.Release( msgPtr );
|
NetMsg.InternalRelease( (NetMsg*) msgPtr );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user