shutdown


Description:

public abstract bool shutdown (bool shutdown_read, bool shutdown_write, Cancellable? cancellable = null) throws Error

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 receive_messages will return g_io_error_closed.

If shutdown_write is true then the sending side of the connection is shut down, and further writing is disallowed. Subsequent calls to send_messages will return g_io_error_closed.

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

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

Parameters:

this

a DtlsConnection

shutdown_read

true to stop reception of incoming datagrams

shutdown_write

true to stop sending outgoing datagrams

cancellable

a Cancellable, or null

Returns:

true on success, false otherwise




2022 vala-language.org