Efl.Net.Dialer_Websocket.close_request

Description

Requests (opcode=0x8) the server to terminate the connection.

Unlike Efl.Io.Closer.close, this won't abruptly close the connection, rather it'll queue a message requesting the server to gracefully close it.

After this method is called you should consider the object in "closing" state. No more messages can be sent (Efl.Net.Dialer_Websocket.text_send, Efl.Net.Dialer_Websocket.binary_send and Efl.Net.Dialer_Websocket.ping will fail).

The object will be automatically closed with Efl.Io.Closer.close once the server replies with his own close message, which will be reported as "closed,reason".

Signature

close_request {
    params {
        @in reason: Efl.Net.Dialer_Websocket_Close_Reason;
        @in message: string @optional;
    }
}

C signature

void efl_net_dialer_websocket_close_request(Eo *obj, Efl_Net_Dialer_Websocket_Close_Reason reason, const char *message);

Parameters

  • reason (in) - Reason for closing
  • message (in) - Additional closing message

Implemented by