Enumerationmigueldeicaza.swiftgodot 0.45.0SwiftGodot
Status
StreamPeerTLS.swift:16enum Status
Cases
case disconnected
A status representing a
StreamPeerTLS
that is disconnected.case handshaking
A status representing a
StreamPeerTLS
during handshaking.case connected
A status representing a
StreamPeerTLS
that is connected to a host.case error
A status representing a
StreamPeerTLS
in error state.case errorHostnameMismatch
An error status that shows a mismatch in the TLS certificate domain presented by the host and the domain requested for validation.
Other members in extension
Type members
Instance members
func acceptStream(StreamPeer?, serverOptions: TLSOptions?
) -> GodotError Accepts a peer connection as a server using the given
serverOptions
. Seeserver(key:certificate:)
.func connectToStream(StreamPeer?, commonName: String, clientOptions: TLSOptions?
) -> GodotError Connects to a peer using an underlying
StreamPeer
stream
and verifying the remote certificate is correctly signed for the givencommonName
. You can pass the optionalclientOptions
parameter to customize the trusted certification authorities, or disable the common name verification. Seeclient(trustedChain:commonNameOverride:)
andclientUnsafe(trustedChain:)
.func disconnectFromStream(
) Disconnects from host.
func getStatus(
) -> StreamPeerTLS.Status Returns the status of the connection. See
Status
for values.func getStream(
) -> StreamPeer? Returns the underlying
StreamPeer
connection, used inacceptStream(_:serverOptions:)
orconnectToStream(_:commonName:clientOptions:)
.func poll(
) Poll the connection to check for incoming bytes. Call this right before
getAvailableBytes
for it to work properly.
Citizens in SwiftGodot
Conformances
protocol CaseIterable
A type that provides a collection of all of its values.
protocol CustomDebugStringConvertible
A type with a customized textual representation suitable for debugging purposes.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol RawRepresentable<RawValue>
A type that can be converted to and from an associated raw value.
Type members
Instance members
var debugDescription: String
A textual representation of this instance, suitable for debugging
Type features
static func != (lhs: Self, rhs: Self
) -> Bool Returns a Boolean value indicating whether two values are not equal.