Popcorning Guinea Pig
Search Results for

    Show / Hide Table of Contents

    Class MockP2PNetworkingService

    Inheritance
    object
    MockP2PNetworkingService
    Implements
    IP2PNetworkingService
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: PopcorningGuineaPig.Engine.Services
    Assembly: PopcorningGuineaPig.Engine.dll
    Syntax
    public class MockP2PNetworkingService : IP2PNetworkingService

    Properties

    | Edit this page View Source

    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.

    Declaration
    public bool AutoAccept { get; set; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    IsAvailable

    Declaration
    public bool IsAvailable { get; set; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    SentPackets

    Declaration
    public List<(CSteamID PeerId, byte[] Data)> SentPackets { get; }
    Property Value
    Type Description
    List<(CSteamID PeerId, byte[] Data)>

    Methods

    | Edit this page View Source

    AcceptSession(CSteamID)

    Declaration
    public void AcceptSession(CSteamID peerId)
    Parameters
    Type Name Description
    CSteamID peerId
    | Edit this page View Source

    CloseSession(CSteamID)

    Declaration
    public void CloseSession(CSteamID peerId)
    Parameters
    Type Name Description
    CSteamID peerId
    | Edit this page View Source

    EnqueueIncoming(CSteamID, byte[])

    Declaration
    public void EnqueueIncoming(CSteamID peerId, byte[] data)
    Parameters
    Type Name Description
    CSteamID peerId
    byte[] data
    | Edit this page View Source

    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.

    Declaration
    public PeerLink GetPeerSession(CSteamID peerId)
    Parameters
    Type Name Description
    CSteamID peerId
    Returns
    Type Description
    PeerLink
    | Edit this page View Source

    IsSessionActive(CSteamID)

    Declaration
    public bool IsSessionActive(CSteamID peerId)
    Parameters
    Type Name Description
    CSteamID peerId
    Returns
    Type Description
    bool
    | Edit this page View Source

    PollPackets()

    Declaration
    public void PollPackets()
    | Edit this page View Source

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

    Declaration
    public void SendPacket(CSteamID peerId, byte[] data, bool reliable = true, int channel = 0)
    Parameters
    Type Name Description
    CSteamID peerId
    byte[] data
    bool reliable
    int channel
    | Edit this page View Source

    SetPeerSession(CSteamID, bool, int, string?)

    Declaration
    public void SetPeerSession(CSteamID peerId, bool live, int endReason = 0, string? debug = null)
    Parameters
    Type Name Description
    CSteamID peerId
    bool live
    int endReason
    string debug
    | Edit this page View Source

    SimulatePeerDisconnected(CSteamID)

    Declaration
    public void SimulatePeerDisconnected(CSteamID peerId)
    Parameters
    Type Name Description
    CSteamID peerId
    | Edit this page View Source

    SimulateSessionRequested(CSteamID)

    Declaration
    public void SimulateSessionRequested(CSteamID peerId)
    Parameters
    Type Name Description
    CSteamID peerId

    Events

    | Edit this page View Source

    OnPacketReceived

    Declaration
    public event Action<CSteamID, byte[]>? OnPacketReceived
    Event Type
    Type Description
    Action<CSteamID, byte[]>
    | Edit this page View Source

    OnPeerDisconnected

    Declaration
    public event Action<CSteamID>? OnPeerDisconnected
    Event Type
    Type Description
    Action<CSteamID>
    | Edit this page View Source

    OnSessionRequested

    Declaration
    public event Action<CSteamID>? OnSessionRequested
    Event Type
    Type Description
    Action<CSteamID>

    Implements

    IP2PNetworkingService
    • Edit this page
    • View Source
    In this article
    Back to top © 2024 Popcorning Guinea Pig Game Engine. A custom C# game engine for indie developers.