Table of Contents

Interface IOnlineSession

Namespace
PopcorningGuineaPig.Engine.Gameplay
Assembly
PopcorningGuineaPig.Engine.dll

The session Banqi and Sven call. Steam and Epic Online Services stay behind it.

public interface IOnlineSession

Properties

Code

Join code for the current lobby, when this process has one. Not written to the log.

string? Code { get; }

Property Value

string

CrossPlay

Set from settings before create, search, or join. Default is on.

bool CrossPlay { get; set; }

Property Value

bool

Current

LobbyKey? Current { get; }

Property Value

LobbyKey?

Launch

LaunchStore Launch { get; }

Property Value

LaunchStore

Listings

IReadOnlyList<LobbyListing> Listings { get; }

Property Value

IReadOnlyList<LobbyListing>

LocalPlayer

PlayerKey? LocalPlayer { get; }

Property Value

PlayerKey?

Pipe

Pipe for the current match, or the pipe the next create would use.

SessionPipe Pipe { get; }

Property Value

SessionPipe

Methods

Create(LobbyKind, int, string)

SessionResult Create(LobbyKind kind, int maxMembers, string game)

Parameters

kind LobbyKind
maxMembers int
game string

Returns

SessionResult

Invite()

InviteAction Invite()

Returns

InviteAction

Join(LobbyKey)

SessionResult Join(LobbyKey lobby)

Parameters

lobby LobbyKey

Returns

SessionResult

JoinCode(string, string)

SessionResult JoinCode(string game, string code)

Parameters

game string
code string

Returns

SessionResult

Leave()

void Leave()
PeerLink Link(PlayerKey player)

Parameters

player PlayerKey

Returns

PeerLink

Members()

IReadOnlyList<MemberCard> Members()

Returns

IReadOnlyList<MemberCard>

Poll()

IReadOnlyList<SessionPacket> Poll()

Returns

IReadOnlyList<SessionPacket>

Search(string)

SessionResult Search(string game)

Parameters

game string

Returns

SessionResult

Send(PlayerKey, byte[], bool)

bool Send(PlayerKey to, byte[] data, bool reliable)

Parameters

to PlayerKey
data byte[]
reliable bool

Returns

bool

Tick()

Pumps EOS on this thread after the platform exists. Steam callbacks stay on SteamManager.RunCallbacks.

void Tick()

Events

PortraitReady

event Action? PortraitReady

Event Type

Action