Instance Methodmigueldeicaza.swiftgodot 0.45.0SwiftGodot
disconnectFromStream
Disconnects from host.
StreamPeerTLS.swift:185final func disconnectFromStream()
Other members in extension
Types
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 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.