I am using libwebsockets C library for writing a websocket server. According to library documentation, it is mentioned that to close websocket connection from server side we need return -1 in callback. When I did that websocket connection is getting closed, but it is not sending any reason.
I want to send Normal Close as the reason from closing websocket connection. Is there any way to achive this libwebsockets. I have seen libwebsockets library has "enum lws_close_status" but there are no api's to use that one.