PacketPeerDTLS

    DTLS packet peer.

    enum Status:

    • STATUS_DISCONNECTED = 0 —- A status representing a that is disconnected.
    • STATUS_HANDSHAKING = 1 —- A status representing a PacketPeerDTLS that is currently performing the handshake with a remote peer.
    • STATUS_CONNECTED = 2 —- A status representing a PacketPeerDTLS that is connected to a remote peer.
    • STATUS_ERROR_HOSTNAME_MISMATCH = 4 —- An error status that shows a mismatch in the DTLS certificate domain presented by the host and the domain requested for validation.
    • connect_to_peer ( PacketPeerUDP packet_peer, validate_certs=true, String for_hostname=””, valid_certificate=null )

    • void disconnect_from_peer ( )

    Disconnects this peer, terminating the DTLS session.



    • void poll ( )

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