DtlsConnection.shutdown

bool shutdown(bool shutdownRead, bool shutdownWrite, gio.cancellable.Cancellable cancellable = null)

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.

Parameters

shutdownReadtrue to stop reception of incoming datagrams
shutdownWritetrue to stop sending outgoing datagrams
cancellablea #GCancellable, or null

Returns

true on success, false otherwise

Throws

[ErrorWrap]