aboutsummaryrefslogtreecommitdiffstats
path: root/pages/develop/api/efl/net/dialer/websocket/method/close_request.txt
blob: 71c57f2dc69c3fb68c051c2cba2a58c93342ab88 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
~~Title: Efl.Net.Dialer.Websocket.close_request~~
===== Signature =====

<code>
close_request {
    params {
        @in reason: Efl.Net.Dialer.Websocket.Close_Reason;
        @in message: free(string, free) @optional;
    }
}
</code>

===== C signature =====

<code c>
void efl_net_dialer_websocket_close_request(Eo *obj, Efl_Net_Dialer_Websocket_Close_Reason reason, const char *message);
</code>

===== Parameters =====

  * **reason** //(in)// - %%Reason for closing%%
  * **message** //(in)// - %%Additional closing message%%

===== Description =====

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

%%Unlike %%[[:develop:api:efl:io:closer:method:close|Efl.Io.Closer.close]]%%, this won't abruptly close the connection, rather will 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 (%%[[:develop:api:efl:net:dialer:websocket:method:text_send|Efl.Net.Dialer.Websocket.text_send]]%%, %%[[:develop:api:efl:net:dialer:websocket:method:binary_send|Efl.Net.Dialer.Websocket.binary_send]]%% and %%[[:develop:api:efl:net:dialer:websocket:method:ping|Efl.Net.Dialer.Websocket.ping]]%% will fail).%%

%%The object will be automatically closed with %%[[:develop:api:efl:io:closer:method:close|Efl.Io.Closer.close]]%% once the serve replies with his own close message, that will be reported as "closed,reason".%%

//Since 1.19//
{{page>:develop:api-include:efl:net:dialer:websocket:method:close_request:description&nouser&nolink&nodate}}

===== Implemented by =====

  * **Efl.Net.Dialer.Websocket.close_request**