on_closed


Description:

[ CCode ( cname = "closed" ) ]
public signal void on_closed (bool remote_peer_vanished, Error? error)

Emitted when the connection is closed.

The cause of this event can be

  • If close is called. In this case remote_peer_vanished is set to false and error is null.
  • If the remote peer closes the connection. In this case remote_peer_vanished is set to true and error is set.
  • If the remote peer sends invalid or malformed data. In this case remote_peer_vanished is set to false and error is set.

Upon receiving this signal, you should give up your reference to connection. You are guaranteed that this signal is emitted only once.

Parameters:

remote_peer_vanished

true if connection is closed because the remote peer closed its end of the connection

error

a Error with more details about the event or null