(965c31410) v0.10.4.0

This commit is contained in:
Joonas Rikkonen
2020-07-30 13:00:09 +03:00
parent eeac247a8e
commit 4978af3d60
539 changed files with 45803 additions and 25359 deletions
@@ -0,0 +1,29 @@
using System.Runtime.InteropServices;
namespace Steamworks.Data
{
[StructLayout( LayoutKind.Sequential )]
public struct Socket
{
internal uint Id;
public override string ToString() => Id.ToString();
public static implicit operator Socket( uint value ) => new Socket() { Id = value };
public static implicit operator uint( Socket value ) => value.Id;
/// <summary>
/// Destroy a listen socket. All the connections that were accepting on the listen
/// socket are closed ungracefully.
/// </summary>
public bool Close()
{
return SteamNetworkingSockets.Internal.CloseListenSocket( Id );
}
public SocketManager Manager
{
get => SteamNetworkingSockets.GetSocketManager( Id );
set => SteamNetworkingSockets.SetSocketManager( Id, value );
}
}
}