Gio.Socket.prototype.is_closed

function is_closed(): Boolean {
    // Gjs wrapper for g_socket_is_closed()
}
  

Checks whether a socket is closed.

Since 2.22

Returns

true if socket is closed, false otherwise