Connects a [code]peer[/code] beginning the DTLS handshake using the underlying [PacketPeerUDP] which must be connected (see [method PacketPeerUDP.connect_to_host]). If [code]validate_certs[/code] is [code]true[/code], [PacketPeerDTLS] will validate that the certificate presented by the remote peer and match it with the [code]for_hostname[/code] argument. You can specify a custom [X509Certificate] to use for validation via the [code]valid_certificate[/code] argument.
</description>
</method>
<methodname="disconnect_from_peer">
<returntype="void">
</return>
<description>
Disconnects this peer, terminating the DTLS session.
</description>
</method>
<methodname="get_status"qualifiers="const">
<returntype="int"enum="PacketPeerDTLS.Status">
</return>
<description>
Returns the status of the connection. See [enum Status] for values.
</description>
</method>
<methodname="poll">
<returntype="void">
</return>
<description>
Poll the connection to check for incoming packets. Call this frequently to update the status and keep the connection working.