reckfellENGINE

PacketPeerDtls

DTLS packet peer.

On this page
class PacketPeerDtlsReckfellSharpInherits PacketPeer

DTLS packet peer.

This class represents a DTLS peer connection. It can be used to connect to a DTLS server, and is returned by DtlsServer.TakeConnection. Note: When exporting to Android, make sure to enable the INTERNET permission in the Android export preset before exporting the project or using remote deploy. Otherwise, network communication of any kind will be blocked by Android. Warning: TLS certificate revocation and certificate pinning are currently not supported. Revoked certificates are accepted as long as they are otherwise valid. If this is a concern, you may want to use automatically managed certificates with a short validity period.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

PacketPeerDtlsConstructor
# PacketPeerDtls
C#
public PacketPeerDtls();

Methods4

ConnectToPeerError
# ConnectToPeer
C#
public Error ConnectToPeer(PacketPeerUdp packetPeer, string hostname, TlsOptions clientOptions = null);

Connects a packet_peer beginning the DTLS handshake using the underlying PacketPeerUdp which must be connected (see PacketPeerUdp.ConnectToHost). You can optionally specify the client_options to be used while verifying the TLS connections. See TlsOptions.Client and TlsOptions.ClientUnsafe.

Parameters
NameTypeDefault
packetPeerPacketPeerUdp—
hostnamestring—
clientOptionsTlsOptionsnull
Returns Error
DisconnectFromPeervoid
# DisconnectFromPeer
C#
public void DisconnectFromPeer();

Disconnects this peer, terminating the DTLS session.

GetStatusPacketPeerDtls.Status
# GetStatus
C#
public PacketPeerDtls.Status GetStatus();

Returns the status of the connection.

Returns PacketPeerDtls.Status
Pollvoid
# Poll
C#
public void Poll();

Poll the connection to check for incoming packets. Call this frequently to update the status and keep the connection working.

PacketPeerDtls.Status

ValueDescription
Connected = 2

A status representing a PacketPeerDtls that is connected to a remote peer.

Disconnected = 0

A status representing a PacketPeerDtls that is disconnected.

Error = 3

A status representing a PacketPeerDtls in a generic error state.

ErrorHostnameMismatch = 4

An error status that shows a mismatch in the DTLS certificate domain presented by the host and the domain requested for validation.

Handshaking = 1

A status representing a PacketPeerDtls that is currently performing the handshake with a remote peer.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.