mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-01-13 15:18:07 +03:00
Added SteamNetworkingSockets.ConnectRelay overload that takes an IConnectionManager
This commit is contained in:
parent
74207eeaf3
commit
5645a91e7f
@ -237,5 +237,24 @@ namespace Steamworks
|
||||
SetConnectionManager( t.Connection.Id, t );
|
||||
return t;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Connect to a relay server
|
||||
/// </summary>
|
||||
public static ConnectionManager ConnectRelay( SteamId serverId, int virtualport, IConnectionManager iface )
|
||||
{
|
||||
NetIdentity identity = serverId;
|
||||
var options = Array.Empty<NetKeyValue>();
|
||||
var connection = Internal.ConnectP2P( ref identity, virtualport, options.Length, options );
|
||||
|
||||
var t = new ConnectionManager
|
||||
{
|
||||
Connection = connection,
|
||||
Interface = iface
|
||||
};
|
||||
|
||||
SetConnectionManager( t.Connection.Id, t );
|
||||
return t;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user