Instance Methodmigueldeicaza.swiftgodot 0.45.0SwiftGodot
getStatus
Returns the status of the connection. See Status
for values.
final func getStatus() -> PacketPeerDTLS.Status
Other members in extension
Types
Type members
Instance members
func connectToPeer(packetPeer: PacketPeerUDP?, hostname: String, clientOptions: TLSOptions?
) -> GodotError Connects a
packetPeer
beginning the DTLS handshake using the underlyingPacketPeerUDP
which must be connected (seeconnectToHost(_:port:)
). You can optionally specify theclientOptions
to be used while verifying the TLS connections. Seeclient(trustedChain:commonNameOverride:)
andclientUnsafe(trustedChain:)
.func disconnectFromPeer(
) Disconnects this peer, terminating the DTLS session.
func poll(
) Poll the connection to check for incoming packets. Call this frequently to update the status and keep the connection working.