Gio.Socket.prototype.get_protocol
function get_protocol(): Gio.SocketProtocol {
// Gjs wrapper for g_socket_get_protocol()
}
Gets the socket protocol id the socket was created with. In case the protocol is unknown, -1 is returned.
Since 2.22
- Returns
a protocol id, or -1 if unknown