mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-26 22:55:55 +03:00
Removing the new networking stuff (for now)
This commit is contained in:
parent
eb9a45bbe0
commit
5d2b8a0ade
@ -7,6 +7,8 @@
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Steamworks.Data;
|
||||
|
||||
#if false
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
[TestClass]
|
||||
@ -285,3 +287,5 @@ public override unsafe void OnMessage( Connection connection, NetIdentity identi
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
@ -5,6 +5,8 @@
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
||||
#if false
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
[TestClass]
|
||||
@ -60,3 +62,5 @@ public async Task GetEstimatedPing()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
@ -2,6 +2,8 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
#if false
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
public class ConnectionInterface
|
||||
@ -118,3 +120,5 @@ public virtual void OnMessage( IntPtr data, int size, long messageNum, long recv
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -3,6 +3,8 @@
|
||||
using System.Runtime.InteropServices;
|
||||
using Steamworks.Data;
|
||||
|
||||
#if false
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
public class SocketInterface
|
||||
@ -110,3 +112,5 @@ public virtual void OnMessage( Connection connection, NetIdentity identity, IntP
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -11,27 +11,7 @@ public abstract class Base : IDisposable
|
||||
{
|
||||
|
||||
#region ISteamMatchmakingServers
|
||||
|
||||
static ISteamMatchmakingServers _internal;
|
||||
internal static ISteamMatchmakingServers Internal
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( _internal == null )
|
||||
{
|
||||
_internal = new ISteamMatchmakingServers();
|
||||
_internal.Init();
|
||||
}
|
||||
|
||||
return _internal;
|
||||
}
|
||||
}
|
||||
|
||||
internal static void Shutdown()
|
||||
{
|
||||
_internal = null;
|
||||
}
|
||||
|
||||
internal static ISteamMatchmakingServers Internal => SteamMatchmakingServers.Internal;
|
||||
#endregion
|
||||
|
||||
|
||||
|
@ -34,10 +34,11 @@ public static void Init( uint appid, bool asyncCallbacks = true )
|
||||
AddInterface<SteamInput>();
|
||||
AddInterface<SteamInventory>();
|
||||
AddInterface<SteamMatchmaking>();
|
||||
AddInterface<SteamMatchmakingServers>();
|
||||
AddInterface<SteamMusic>();
|
||||
AddInterface<SteamNetworking>();
|
||||
AddInterface<SteamNetworkingSockets>();
|
||||
AddInterface<SteamNetworkingUtils>();
|
||||
//AddInterface<SteamNetworkingSockets>();
|
||||
//AddInterface<SteamNetworkingUtils>();
|
||||
AddInterface<SteamParental>();
|
||||
AddInterface<SteamParties>();
|
||||
AddInterface<SteamRemoteStorage>();
|
||||
@ -115,8 +116,6 @@ internal static void Cleanup()
|
||||
|
||||
Event.DisposeAllClient();
|
||||
ShutdownInterfaces();
|
||||
|
||||
ServerList.Base.Shutdown();
|
||||
}
|
||||
|
||||
internal static void RegisterCallback( IntPtr intPtr, int callbackId )
|
||||
|
@ -6,6 +6,8 @@
|
||||
using System.Threading.Tasks;
|
||||
using Steamworks.Data;
|
||||
|
||||
#if false
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
public class SteamNetworkingSockets : SteamClass
|
||||
@ -143,3 +145,5 @@ private static void ConnectionStatusChanged( SteamNetConnectionStatusChangedCall
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -5,6 +5,8 @@
|
||||
using System.Threading.Tasks;
|
||||
using Steamworks.Data;
|
||||
|
||||
#if false
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
/// <summary>
|
||||
@ -202,3 +204,5 @@ internal unsafe static bool SetConnectionConfig( uint con, NetConfig type, strin
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -29,7 +29,7 @@ internal override void InitializeInterface()
|
||||
internal static void InstallEvents()
|
||||
{
|
||||
SteamInventory.InstallEvents();
|
||||
SteamNetworkingSockets.InstallEvents(true);
|
||||
//SteamNetworkingSockets.InstallEvents(true);
|
||||
|
||||
ValidateAuthTicketResponse_t.Install( x => OnValidateAuthTicketResponse?.Invoke( x.SteamID, x.OwnerSteamID, x.AuthSessionResponse ), true );
|
||||
SteamServersConnected_t.Install( x => OnSteamServersConnected?.Invoke(), true );
|
||||
@ -85,6 +85,8 @@ public static void Init( AppId appid, SteamServerInit init, bool asyncCallbacks
|
||||
throw new System.Exception( $"InitGameServer returned false ({ipaddress},{init.SteamPort},{init.GamePort},{init.QueryPort},{secure},\"{init.VersionString}\")" );
|
||||
}
|
||||
|
||||
Install
|
||||
|
||||
//
|
||||
// Initial settings
|
||||
//
|
||||
|
@ -1,6 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
#if false
|
||||
|
||||
namespace Steamworks.Data
|
||||
{
|
||||
public struct Connection
|
||||
@ -115,3 +117,12 @@ public IEnumerable<SteamNetworkingMessage_t> Messages
|
||||
|
||||
}
|
||||
}
|
||||
#else
|
||||
namespace Steamworks.Data
|
||||
{
|
||||
public struct Connection
|
||||
{
|
||||
public uint Id { get; }
|
||||
}
|
||||
}
|
||||
#endif
|
@ -1,5 +1,7 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
#if false
|
||||
|
||||
namespace Steamworks.Data
|
||||
{
|
||||
/// <summary>
|
||||
@ -65,3 +67,5 @@ public int EstimatePingTo( PingLocation target )
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -1,4 +1,5 @@
|
||||
namespace Steamworks.Data
|
||||
#if false
|
||||
namespace Steamworks.Data
|
||||
{
|
||||
public struct Socket
|
||||
{
|
||||
@ -21,3 +22,12 @@ public SocketInterface Interface
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
namespace Steamworks.Data
|
||||
{
|
||||
public struct Socket
|
||||
{
|
||||
public uint Id { get; }
|
||||
}
|
||||
}
|
||||
#endif
|
@ -71,5 +71,13 @@ internal static class GetApi
|
||||
internal static extern IntPtr SteamGameServer();
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamGameServerStats" )]
|
||||
internal static extern IntPtr SteamGameServerStats();
|
||||
|
||||
//
|
||||
// NOTE: Stubs - these don't exist
|
||||
//
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamNetworkingSockets" )]
|
||||
internal static extern IntPtr SteamNetworkingSockets();
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamNetworkingUtils" )]
|
||||
internal static extern IntPtr SteamNetworkingUtils();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user