Table of Contents

Class OnlineSession

Namespace
PopcorningGuineaPig.Engine.Gameplay
Assembly
PopcorningGuineaPig.Engine.dll
public sealed class OnlineSession : IOnlineSession
Inheritance
OnlineSession
Implements
Inherited Members

Constructors

OnlineSession()

public OnlineSession()

Properties

Code

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

public string? Code { get; }

Property Value

string

CrossPlay

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

public bool CrossPlay { get; set; }

Property Value

bool

Current

public LobbyKey? Current { get; }

Property Value

LobbyKey?

Instance

public static OnlineSession Instance { get; }

Property Value

OnlineSession

Launch

public LaunchStore Launch { get; }

Property Value

LaunchStore

Listings

public IReadOnlyList<LobbyListing> Listings { get; }

Property Value

IReadOnlyList<LobbyListing>

LocalPlayer

public PlayerKey? LocalPlayer { get; }

Property Value

PlayerKey?

Pipe

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

public SessionPipe Pipe { get; }

Property Value

SessionPipe

Methods

Create(LobbyKind, int, string)

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

Parameters

kind LobbyKind
maxMembers int
game string

Returns

SessionResult

Invite()

public InviteAction Invite()

Returns

InviteAction

Join(LobbyKey)

public SessionResult Join(LobbyKey lobby)

Parameters

lobby LobbyKey

Returns

SessionResult

JoinCode(string, string)

public SessionResult JoinCode(string game, string code)

Parameters

game string
code string

Returns

SessionResult

Leave()

public void Leave()
public PeerLink Link(PlayerKey player)

Parameters

player PlayerKey

Returns

PeerLink

Members()

public IReadOnlyList<MemberCard> Members()

Returns

IReadOnlyList<MemberCard>

Poll()

public IReadOnlyList<SessionPacket> Poll()

Returns

IReadOnlyList<SessionPacket>

Search(string)

public SessionResult Search(string game)

Parameters

game string

Returns

SessionResult

Send(PlayerKey, byte[], bool)

public 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.

public void Tick()

Events

PortraitReady

public event Action? PortraitReady

Event Type

Action