Table of Contents

Class P2PException

Namespace
SteamNetworkLib.Exceptions
Assembly
SteamNetworkLib.dll

Exception thrown when peer-to-peer (P2P) communication operations fail. Provides additional context about Steam P2P operations including target IDs, session errors, and channels.

public class P2PException : SteamNetworkException, ISerializable
Inheritance
P2PException
Implements
Inherited Members

Constructors

P2PException()

Initializes a new instance of the P2PException class.

public P2PException()

P2PException(string)

Initializes a new instance of the P2PException class with a specified error message.

public P2PException(string message)

Parameters

message string

The message that describes the error.

P2PException(string, CSteamID)

Initializes a new instance of the P2PException class with a specified error message and target peer ID.

public P2PException(string message, CSteamID targetId)

Parameters

message string

The message that describes the error.

targetId CSteamID

The Steam ID of the target peer associated with the operation.

P2PException(string, CSteamID, EP2PSessionError)

Initializes a new instance of the P2PException class with a specified error message, target peer ID, and session error.

public P2PException(string message, CSteamID targetId, EP2PSessionError sessionError)

Parameters

message string

The message that describes the error.

targetId CSteamID

The Steam ID of the target peer associated with the operation.

sessionError EP2PSessionError

The P2P session error that occurred during the operation.

P2PException(string, CSteamID, int)

Initializes a new instance of the P2PException class with a specified error message, target peer ID, and channel.

public P2PException(string message, CSteamID targetId, int channel)

Parameters

message string

The message that describes the error.

targetId CSteamID

The Steam ID of the target peer associated with the operation.

channel int

The communication channel associated with the P2P operation.

P2PException(string, EP2PSessionError)

Initializes a new instance of the P2PException class with a specified error message and session error.

public P2PException(string message, EP2PSessionError sessionError)

Parameters

message string

The message that describes the error.

sessionError EP2PSessionError

The P2P session error that occurred during the operation.

P2PException(string, Exception)

Initializes a new instance of the P2PException class with a specified error message and a reference to the inner exception that is the cause of this exception.

public P2PException(string message, Exception inner)

Parameters

message string

The error message that explains the reason for the exception.

inner Exception

The exception that is the cause of the current exception, or a null reference if no inner exception is specified.

Properties

Channel

Gets the communication channel associated with the P2P operation.

public int Channel { get; }

Property Value

int

SessionError

Gets the P2P session error that occurred during the operation, if available.

public EP2PSessionError? SessionError { get; }

Property Value

EP2PSessionError?

TargetId

Gets the Steam ID of the target peer associated with the P2P operation, if available.

public CSteamID? TargetId { get; }

Property Value

CSteamID?