Improve the binds in WebServer.

This commit is contained in:
Relintai 2022-07-22 12:05:05 +02:00
parent caa93f89b0
commit cf3c24381d
2 changed files with 2 additions and 13 deletions

View File

@ -14,18 +14,10 @@ WebNode *WebServer::get_web_root() {
return _web_root; return _web_root;
} }
Node *WebServer::get_web_root_bind() {
return _web_root;
}
HTTPSessionManager *WebServer::get_session_manager() { HTTPSessionManager *WebServer::get_session_manager() {
return _session_manager; return _session_manager;
} }
Node *WebServer::get_session_manager_bind() {
return _session_manager;
}
void WebServer::server_handle_request(Ref<WebServerRequest> request) { void WebServer::server_handle_request(Ref<WebServerRequest> request) {
ERR_FAIL_COND(!_web_root); ERR_FAIL_COND(!_web_root);
@ -150,8 +142,8 @@ void WebServer::_notification(int p_what) {
} }
void WebServer::_bind_methods() { void WebServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_web_root"), &WebServer::get_web_root_bind); ClassDB::bind_method(D_METHOD("get_web_root"), &WebServer::get_web_root);
ClassDB::bind_method(D_METHOD("get_session_manager"), &WebServer::get_session_manager_bind); ClassDB::bind_method(D_METHOD("get_session_manager"), &WebServer::get_session_manager);
ClassDB::bind_method(D_METHOD("server_handle_request", "request"), &WebServer::server_handle_request); ClassDB::bind_method(D_METHOD("server_handle_request", "request"), &WebServer::server_handle_request);
ClassDB::bind_method(D_METHOD("request_write_lock"), &WebServer::request_write_lock); ClassDB::bind_method(D_METHOD("request_write_lock"), &WebServer::request_write_lock);

View File

@ -22,10 +22,7 @@ public:
bool get_is_running(); bool get_is_running();
WebNode *get_web_root(); WebNode *get_web_root();
Node *get_web_root_bind();
HTTPSessionManager *get_session_manager(); HTTPSessionManager *get_session_manager();
Node *get_session_manager_bind();
void server_handle_request(Ref<WebServerRequest> request); void server_handle_request(Ref<WebServerRequest> request);