Class SteamP2PNetworkingService
public class SteamP2PNetworkingService : IP2PNetworkingService
- Inheritance
-
SteamP2PNetworkingService
- Implements
- Inherited Members
Constructors
SteamP2PNetworkingService(SteamManager)
public SteamP2PNetworkingService(SteamManager steamManager)
Parameters
steamManagerSteamManager
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
IsAvailable
public bool IsAvailable { get; }
Property Value
Methods
AcceptSession(CSteamID)
public void AcceptSession(CSteamID peerId)
Parameters
peerIdCSteamID
CloseSession(CSteamID)
public void CloseSession(CSteamID peerId)
Parameters
peerIdCSteamID
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
peerIdCSteamID
Returns
PollPackets()
public void PollPackets()
SendPacket(CSteamID, byte[], bool, int)
public void SendPacket(CSteamID peerId, byte[] data, bool reliable = true, int channel = 0)
Parameters
Events
OnPacketReceived
public event Action<CSteamID, byte[]>? OnPacketReceived
Event Type
OnPeerDisconnected
public event Action<CSteamID>? OnPeerDisconnected
Event Type
- Action<CSteamID>
OnSessionRequested
public event Action<CSteamID>? OnSessionRequested
Event Type
- Action<CSteamID>