Class MockP2PNetworkingService
Inheritance
MockP2PNetworkingService
Assembly: PopcorningGuineaPig.Engine.dll
Syntax
public class MockP2PNetworkingService : IP2PNetworkingService
Properties
|
Edit this page
View Source
AutoAccept
Declaration
public bool AutoAccept { get; set; }
Property Value
|
Edit this page
View Source
IsAvailable
Declaration
public bool IsAvailable { get; set; }
Property Value
|
Edit this page
View Source
SentPackets
Declaration
public List<(CSteamID PeerId, byte[] Data)> SentPackets { get; }
Property Value
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
|
Edit this page
View Source
IsSessionActive(CSteamID)
Declaration
public bool IsSessionActive(CSteamID peerId)
Parameters
| Type |
Name |
Description |
| CSteamID |
peerId |
|
Returns
|
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
|
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