DtlsConnection.shutdown

Shut down part or all of a DTLS connection.

If shutdown_read is true then the receiving side of the connection is shut down, and further reading is disallowed. Subsequent calls to gio.datagram_based.DatagramBased.receiveMessages will return gio.types.IOErrorEnum.Closed.

If shutdown_write is true then the sending side of the connection is shut down, and further writing is disallowed. Subsequent calls to gio.datagram_based.DatagramBased.sendMessages will return gio.types.IOErrorEnum.Closed.

It is allowed for both shutdown_read and shutdown_write to be TRUE — this is equivalent to calling gio.dtls_connection.DtlsConnection.close.

If cancellable is cancelled, the #GDtlsConnection may be left partially-closed and any pending untransmitted data may be lost. Call gio.dtls_connection.DtlsConnection.shutdown again to complete closing the #GDtlsConnection.

interface DtlsConnection
bool
shutdown

Parameters

shutdownRead bool

true to stop reception of incoming datagrams

shutdownWrite bool

true to stop sending outgoing datagrams

cancellable gio.cancellable.Cancellable

a #GCancellable, or null

Return Value

Type: bool

true on success, false otherwise