.\" .\" Copyright (C) 2016-2022 Davidson Francis .\" .\" This program is free software: you can redistribute it and/or modify .\" it under the terms of the GNU General Public License as published by .\" the Free Software Foundation, either version 3 of the License, or .\" (at your option) any later version. .\" .\" This program is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" .\" You should have received a copy of the GNU General Public License .\" along with this program. If not, see .\" .TH man 3 "04 Apr 2022" "1.0" "wsServer man page" .SH NAME ws_close_connection \- Close the client connection. .SH SYNOPSIS .nf .B #include .sp .BI "int ws_close_client(ws_cli_conn_t " *client "); .fi .SH DESCRIPTION .BR ws_close_client () for a given client .I client , closes the client connection with normal close code (1000) and no reason string. .SH RETURN VALUE Returns 0 if success, -1 otherwise. .SH NOTES If the client did not send a close frame in TIMEOUT_MS ms (500 ms), the server will close the connection with error code (1002). .SH AUTHOR Davidson Francis (davidsondfgl@gmail.com)