mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-03-13 05:50:16 +03:00
Modified SteamNetworkingSockets.CreateRelaySocketFakeIP, so that it can be passed a send buffer size
Fixed SteamNetworkingMessages that was missing some static keywords
This commit is contained in:
parent
15a9f334e4
commit
a3124e504e
@ -42,10 +42,10 @@ namespace Steamworks
|
||||
|
||||
public static Action<ConnectionInfo> OnSessionFailed;
|
||||
|
||||
public bool AcceptSessionWithUser( ref NetIdentity identity ) => Internal.AcceptSessionWithUser( ref identity );
|
||||
public bool CloseSessionWithUser( ref NetIdentity identity ) => Internal.CloseSessionWithUser( ref identity );
|
||||
public bool CloseChannelWithUser( ref NetIdentity identity, int channel ) => Internal.CloseChannelWithUser( ref identity, channel );
|
||||
public ConnectionState GetSessionConnectionInfo( ref NetIdentity identity, ref ConnectionInfo info, ref ConnectionStatus status ) => Internal.GetSessionConnectionInfo( ref identity, ref info, ref status );
|
||||
public static bool AcceptSessionWithUser( ref NetIdentity identity ) => Internal.AcceptSessionWithUser( ref identity );
|
||||
public static bool CloseSessionWithUser( ref NetIdentity identity ) => Internal.CloseSessionWithUser( ref identity );
|
||||
public static bool CloseChannelWithUser( ref NetIdentity identity, int channel ) => Internal.CloseChannelWithUser( ref identity, channel );
|
||||
public static ConnectionState GetSessionConnectionInfo( ref NetIdentity identity, ref ConnectionInfo info, ref ConnectionStatus status ) => Internal.GetSessionConnectionInfo( ref identity, ref info, ref status );
|
||||
|
||||
public static unsafe Result SendMessageToUser( ref NetIdentity identity, byte[] data, SteamNetworkingOptions flags, int channel)
|
||||
{
|
||||
|
@ -311,10 +311,13 @@ namespace Steamworks
|
||||
/// To use this derive a class from <see cref="SocketManager"/> and override as much as you want.
|
||||
///
|
||||
/// </summary>
|
||||
public static T CreateRelaySocketFakeIP<T>( int fakePortIndex = 0 ) where T : SocketManager, new()
|
||||
public static T CreateRelaySocketFakeIP<T>( int fakePortIndex = 0, int sendBufferSize = 524288 ) where T : SocketManager, new()
|
||||
{
|
||||
var t = new T();
|
||||
var options = Array.Empty<NetKeyValue>();
|
||||
var options = new NetKeyValue[1];
|
||||
options[0].DataType = NetConfigType.Int32;
|
||||
options[0].Value = NetConfig.SendBufferSize;
|
||||
options[0].Int32Value = sendBufferSize;
|
||||
t.Socket = Internal.CreateListenSocketP2PFakeIP( 0, options.Length, options );
|
||||
t.Initialize();
|
||||
SetSocketManager( t.Socket.Id, t );
|
||||
|
Loading…
x
Reference in New Issue
Block a user