mirror of
https://github.com/cesanta/mongoose.git
synced 2024-11-24 11:09:01 +08:00
Sending MG_WEBSOCKET_CLOSE
This commit is contained in:
parent
72c861bb83
commit
25863b59a6
@ -3710,6 +3710,7 @@ static void handle_websocket_request(struct mg_connection *conn) {
|
||||
send_websocket_handshake(conn);
|
||||
call_user(conn, MG_WEBSOCKET_READY);
|
||||
read_websocket(conn);
|
||||
call_user(conn, MG_WEBSOCKET_CLOSE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -62,7 +62,7 @@ enum mg_event {
|
||||
// with handshake, otherwise it closes the connection.
|
||||
MG_WEBSOCKET_READY, // Handshake has been successfully completed.
|
||||
MG_WEBSOCKET_MESSAGE, // Incoming message from the client
|
||||
MG_WEBSOCKET_CLOSE, // Client has sent FIN frame
|
||||
MG_WEBSOCKET_CLOSE, // Client has closed the connection
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user