Class RemoteSessionBridge
public class RemoteSessionBridge : IServerBridge
- Inheritance
-
RemoteSessionBridge
- Implements
- Inherited Members
Constructors
RemoteSessionBridge(GameSession, IPAddress)
public RemoteSessionBridge(GameSession session, IPAddress hostAddress)
Parameters
session
GameSessionhostAddress
IPAddress
Properties
AssetRegistry
Returns an asset registry for asset string bookkeeping. In singleplayer, it returns the server's own copy directly. In multiplayer, it constructs itself from the server's packets.
public AssetRegistry AssetRegistry { get; }
Property Value
ConnectionState
In singleplayer, returns either Disconnected or Connected. In multiplayer, it may be any of the GameSessionState values.
public GameSessionState ConnectionState { get; }
Property Value
Methods
SendAssetInfoResponse(Span<int>, Span<int>)
Maps to AssetInfoResponse.
public void SendAssetInfoResponse(Span<int> missingAssetIds, Span<int> assetHashes)
Parameters
SendAuthResponse(string?)
Maps to AuthResponse.
public void SendAuthResponse(string? password)
Parameters
password
string
SendEventPayload(int, int, object[]?)
Not implemented.
Maps to EventPayload.
public void SendEventPayload(int entityId, int eventId, object[]? args)
Parameters
SendInputPayload(in ClientCommands)
Sends a ClientCommands snapshot to the server. This is performed by clients multiple times per second.
In singleplayer, this directly copies snapshot
into the server's client snapshot buffer.
In multiplayer, it emits it as a packet.
public void SendInputPayload(in ClientCommands snapshot)
Parameters
snapshot
ClientCommands
SendJoinRequest(IPAddress)
In singleplayer, immediately hooks onto the server. In multiplayer, sends packets in an attempt to connect.
Maps to JoinRequest.
public void SendJoinRequest(IPAddress address)
Parameters
address
IPAddress
SendSpawnComplete()
Maps to SpawnComplete.
public void SendSpawnComplete()
SendSpawnRequest()
Maps to SpawnRequest.
public void SendSpawnRequest()
Update(float)
In singleplayer: does nothing really. In multiplayer: receives gamestate packets from the server.
public void Update(float delta)
Parameters
delta
float