Interface IP2PNetworkingService
public interface IP2PNetworkingService
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.
bool AutoAccept { get; set; }
Property Value
IsAvailable
bool IsAvailable { get; }
Property Value
Methods
AcceptSession(CSteamID)
void AcceptSession(CSteamID peerId)
Parameters
peerIdCSteamID
CloseSession(CSteamID)
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.
PeerLink GetPeerSession(CSteamID peerId)
Parameters
peerIdCSteamID
Returns
PollPackets()
void PollPackets()
SendPacket(CSteamID, byte[], bool, int)
void SendPacket(CSteamID peerId, byte[] data, bool reliable = true, int channel = 0)
Parameters
Events
OnPacketReceived
event Action<CSteamID, byte[]>? OnPacketReceived
Event Type
OnPeerDisconnected
event Action<CSteamID>? OnPeerDisconnected
Event Type
- Action<CSteamID>
OnSessionRequested
event Action<CSteamID>? OnSessionRequested
Event Type
- Action<CSteamID>