reckfellENGINE

StreamPeerTls

A stream peer that handles TLS connections.

On this page
class StreamPeerTlsReckfellSharpInherits StreamPeer

A stream peer that handles TLS connections.

A stream peer that handles TLS connections. This object can be used to connect to a TLS server or accept a single TLS client connection. 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.

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

Constructors1

StreamPeerTlsConstructor
# StreamPeerTls
C#
public StreamPeerTls();

Methods6

AcceptStreamError
# AcceptStream
C#
public Error AcceptStream(StreamPeer stream, TlsOptions serverOptions);

Accepts a peer connection as a server using the given server_options. See TlsOptions.Server.

Parameters
NameTypeDefault
streamStreamPeer—
serverOptionsTlsOptions—
Returns Error
ConnectToStreamError
# ConnectToStream
C#
public Error ConnectToStream(StreamPeer stream, string commonName, TlsOptions clientOptions = null);

Connects to a peer using an underlying StreamPeer stream and verifying the remote certificate is correctly signed for the given common_name. You can pass the optional client_options parameter to customize the trusted certification authorities, or disable the common name verification. See TlsOptions.Client and TlsOptions.ClientUnsafe.

Parameters
NameTypeDefault
streamStreamPeer—
commonNamestring—
clientOptionsTlsOptionsnull
Returns Error
DisconnectFromStreamvoid
# DisconnectFromStream
C#
public void DisconnectFromStream();

Disconnects from host.

GetStatusStreamPeerTls.Status
# GetStatus
C#
public StreamPeerTls.Status GetStatus();

Returns the status of the connection.

Returns StreamPeerTls.Status
GetStreamStreamPeer
# GetStream
C#
public StreamPeer GetStream();

Returns the underlying StreamPeer connection, used in StreamPeerTls.AcceptStream or StreamPeerTls.ConnectToStream.

Returns StreamPeer
Pollvoid
# Poll
C#
public void Poll();

Poll the connection to check for incoming bytes. Call this right before StreamPeer.GetAvailableBytes for it to work properly.

StreamPeerTls.Status

ValueDescription
Connected = 2

A status representing a StreamPeerTls that is connected to a host.

Disconnected = 0

A status representing a StreamPeerTls that is disconnected.

Error = 3

A status representing a StreamPeerTls in error state.

ErrorHostnameMismatch = 4

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

Handshaking = 1

A status representing a StreamPeerTls during handshaking.

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.