13
0

WebSockets: rename send_index_* to send_availsurf_* to avoid confusion with a static index page

This commit is contained in:
Luciano Iam 2020-04-12 10:42:46 +02:00 committed by Robin Gareus
parent e7f22cf989
commit 30c8563a6d
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 7 additions and 7 deletions

View File

@ -333,7 +333,7 @@ WebsocketsServer::write_client (Client wsi)
}
int
WebsocketsServer::send_index_hdr (Client wsi)
WebsocketsServer::send_availsurf_hdr (Client wsi)
{
char url[1024];
@ -384,7 +384,7 @@ WebsocketsServer::send_index_hdr (Client wsi)
}
int
WebsocketsServer::send_index_body (Client wsi)
WebsocketsServer::send_availsurf_body (Client wsi)
{
std::string index = _resources.scan ();
@ -505,13 +505,13 @@ WebsocketsServer::lws_callback (struct lws* wsi, enum lws_callback_reasons reaso
break;
/* will be called only if the requested url is not fulfilled
by the any of the mount configurations (index, builtin, user) */
by the any of the mount configurations (builtin, user) */
case LWS_CALLBACK_HTTP:
rc = server->send_index_hdr (wsi);
rc = server->send_availsurf_hdr (wsi);
break;
case LWS_CALLBACK_HTTP_WRITEABLE:
rc = server->send_index_body (wsi);
rc = server->send_availsurf_body (wsi);
break;
case LWS_CALLBACK_CLOSED_HTTP:

View File

@ -86,8 +86,8 @@ private:
int del_client (Client);
int recv_client (Client, void*, size_t);
int write_client (Client);
int send_index_hdr (Client);
int send_index_body (Client);
int send_availsurf_hdr (Client);
int send_availsurf_body (Client);
bool io_handler (Glib::IOCondition, lws_sockfd_type);