Table of Contents

Class SteamP2PNetworkingService

Namespace
PopcorningGuineaPig.Engine.Services
Assembly
PopcorningGuineaPig.Engine.dll
public class SteamP2PNetworkingService : IP2PNetworkingService
Inheritance
SteamP2PNetworkingService
Implements
Inherited Members

Constructors

SteamP2PNetworkingService(SteamManager)

public SteamP2PNetworkingService(SteamManager steamManager)

Parameters

steamManager SteamManager

Properties

AutoAccept

When true (the default), incoming sessions are accepted after OnSessionRequested fires. Banqi relies on that. Set false and call AcceptSession(CSteamID) yourself to filter.

public bool AutoAccept { get; set; }

Property Value

bool

IsAvailable

public bool IsAvailable { get; }

Property Value

bool

Methods

AcceptSession(CSteamID)

public void AcceptSession(CSteamID peerId)

Parameters

peerId CSteamID

CloseSession(CSteamID)

public void CloseSession(CSteamID peerId)

Parameters

peerId CSteamID

GetPeerSession(CSteamID)

Whether this peer's Messages session is Connected, the last SessionFailed end reason (0 if that callback never fired), and its debug string. A session that goes quiet without the callback is not live.

public PeerLink GetPeerSession(CSteamID peerId)

Parameters

peerId CSteamID

Returns

PeerLink

PollPackets()

public void PollPackets()

SendPacket(CSteamID, byte[], bool, int)

public void SendPacket(CSteamID peerId, byte[] data, bool reliable = true, int channel = 0)

Parameters

peerId CSteamID
data byte[]
reliable bool
channel int

Events

OnPacketReceived

public event Action<CSteamID, byte[]>? OnPacketReceived

Event Type

Action<CSteamID, byte[]>

OnPeerDisconnected

public event Action<CSteamID>? OnPeerDisconnected

Event Type

Action<CSteamID>

OnSessionRequested

public event Action<CSteamID>? OnSessionRequested

Event Type

Action<CSteamID>