Restructuring of the files

This commit is contained in:
2025-02-25 12:58:41 +02:00
parent 8a25503432
commit b37fd411c6
154 changed files with 5 additions and 12 deletions

View File

@@ -0,0 +1,29 @@

using System.Runtime.InteropServices;
namespace Facepunch.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 );
}
}
}