pandemonium_engine/modules/http_server_simple/doc_classes/WebServerSimple.xml

107 lines
5.2 KiB
XML
Raw Normal View History

2022-08-21 00:40:49 +02:00
<?xml version="1.0" encoding="UTF-8" ?>
2024-04-26 17:32:25 +02:00
<class name="WebServerSimple" inherits="WebServer" version="4.4">
2022-08-21 00:40:49 +02:00
<brief_description>
2024-03-10 10:24:16 +01:00
Default [WebServer] implementation.
2022-08-21 00:40:49 +02:00
</brief_description>
<description>
2024-03-10 10:24:16 +01:00
Default [WebServer] implementation.
2022-08-21 00:40:49 +02:00
</description>
<tutorials>
</tutorials>
<methods>
<method name="add_mime_type">
<return type="void" />
<argument index="0" name="file_extension" type="String" />
<argument index="1" name="mime_type" type="String" />
<description>
2024-03-10 10:24:16 +01:00
Adds a mime type to the server. Mime types are used by browsers to better display contents.
2022-08-21 00:40:49 +02:00
</description>
</method>
<method name="is_running" qualifiers="const">
<return type="bool" />
<description>
2024-03-10 10:24:16 +01:00
Check whether the server is running or not.
2022-08-21 00:40:49 +02:00
</description>
</method>
<method name="remove_mime_type">
<return type="void" />
<argument index="0" name="file_extension" type="String" />
<description>
2024-03-10 10:24:16 +01:00
Removes a mime type from the server.
2022-08-21 00:40:49 +02:00
</description>
</method>
</methods>
<members>
<member name="bind_host" type="String" setter="set_bind_host" getter="get_bind_host" default="&quot;0.0.0.0&quot;">
2024-03-10 10:24:16 +01:00
What ip to bind to (use).
2022-08-21 00:40:49 +02:00
</member>
<member name="bind_port" type="int" setter="set_bind_port" getter="get_bind_port" default="8080">
2024-03-10 10:24:16 +01:00
What port to bind to (use).
2022-08-21 00:40:49 +02:00
</member>
2023-06-13 16:51:37 +02:00
<member name="max_request_size" type="int" setter="set_max_request_size" getter="get_max_request_size" default="3">
2024-03-10 10:24:16 +01:00
The maximum allowed request size.
This includes the entire request header, including file uploads (only if they are stored in memory) because then a big file upload or request can eat all the ram in a server!
Also 0 means 0, not unlimited. This should NOT change (Reason: line above).
2023-06-13 16:51:37 +02:00
</member>
<member name="max_request_size_type" type="int" setter="set_max_request_size_type" getter="get_max_request_size_type" enum="WebServerSimple.MaxRequestSizeTypes" default="2">
2024-03-10 10:24:16 +01:00
The type of [member max_request_size].
2023-06-13 16:51:37 +02:00
</member>
2022-08-21 00:40:49 +02:00
<member name="ssl_cert" type="String" setter="set_ssl_cert" getter="get_ssl_cert" default="&quot;&quot;">
2024-03-10 10:24:16 +01:00
Path to your ssl certificate.
2022-08-21 00:40:49 +02:00
</member>
<member name="ssl_key" type="String" setter="set_ssl_key" getter="get_ssl_key" default="&quot;&quot;">
2024-03-10 10:24:16 +01:00
Path to your ssl key.
2022-08-21 00:40:49 +02:00
</member>
<member name="start_on_ready" type="bool" setter="set_start_on_ready" getter="get_start_on_ready" default="false">
2024-03-10 10:24:16 +01:00
Whether to start the server when it enters the [SceneTree].
</member>
2024-03-10 10:10:02 +01:00
<member name="upload_file_store_type" type="int" setter="upload_set_file_store_type" getter="upload_get_file_store_type" enum="WebServerSimple.FileUploadStoreType" default="0">
2024-03-10 10:24:16 +01:00
How the server stores the data uploaded as files.
2024-03-10 10:10:02 +01:00
</member>
<member name="upload_request_max_file_size" type="int" setter="upload_set_request_max_file_size" getter="upload_get_request_max_file_size">
2024-03-10 10:24:16 +01:00
The file upload limit per request. Total, not per file (less room for misconfigurations).
Only relevant if [member upload_file_store_type] == FILE_UPLOAD_STORE_TYPE_TEMP_FILES.
2024-03-10 10:10:02 +01:00
</member>
<member name="upload_request_max_file_size_type" type="int" setter="upload_set_request_max_file_size_type" getter="upload_get_request_max_file_size_type" enum="WebServerSimple.MaxRequestSizeTypes">
2024-03-10 10:24:16 +01:00
The type of [member upload_request_max_file_size].
Only relevant if [member upload_file_store_type] == FILE_UPLOAD_STORE_TYPE_TEMP_FILES.
2024-03-10 10:10:02 +01:00
</member>
<member name="upload_temp_file_store_path" type="String" setter="upload_set_temp_file_store_path" getter="upload_get_temp_file_store_path">
2024-03-10 10:24:16 +01:00
Where to store temporary files.
Only relevant if [member upload_file_store_type] == FILE_UPLOAD_STORE_TYPE_TEMP_FILES.
2024-03-10 10:10:02 +01:00
</member>
2022-08-21 00:40:49 +02:00
<member name="use_poll_thread" type="bool" setter="set_use_poll_thread" getter="get_use_poll_thread" default="true">
2024-03-10 10:24:16 +01:00
Whether to use a separate thread for polling the server socket or not.
2022-08-21 00:40:49 +02:00
</member>
<member name="use_ssl" type="bool" setter="set_use_ssl" getter="get_use_ssl" default="false">
2024-03-10 10:24:16 +01:00
Whether to use ssl or not. if [member ssl_cert] and [member ssl_key] is not set, the server will generate them for you.
2022-08-21 00:40:49 +02:00
</member>
<member name="use_worker_threads" type="bool" setter="set_use_worker_threads" getter="get_use_worker_threads" default="true">
2024-03-10 10:24:16 +01:00
Whether to use a separate worker threads for handling requests or not.
2022-08-21 00:40:49 +02:00
</member>
<member name="worker_thread_count" type="int" setter="set_worker_thread_count" getter="get_worker_thread_count" default="4">
2024-03-10 10:24:16 +01:00
How many worker threads to use when [member use_worker_threads] is enabled.
2022-08-21 00:40:49 +02:00
</member>
</members>
<constants>
2023-06-13 16:51:37 +02:00
<constant name="MAX_REQUEST_SIZE_TYPE_BYTE" value="0" enum="MaxRequestSizeTypes">
2024-03-10 10:24:16 +01:00
Byte.
2023-06-13 16:51:37 +02:00
</constant>
<constant name="MAX_REQUEST_SIZE_TYPE_KILO_BYTE" value="1" enum="MaxRequestSizeTypes">
2024-03-10 10:24:16 +01:00
Kilo Byte.
2023-06-13 16:51:37 +02:00
</constant>
<constant name="MAX_REQUEST_SIZE_TYPE_MEGA_BYTE" value="2" enum="MaxRequestSizeTypes">
2024-03-10 10:24:16 +01:00
Mega Byte.
2023-06-13 16:51:37 +02:00
</constant>
<constant name="MAX_REQUEST_SIZE_TYPE_GIGA_BYTE" value="3" enum="MaxRequestSizeTypes">
2024-03-10 10:24:16 +01:00
Giga Byte.
2023-06-13 16:51:37 +02:00
</constant>
2024-03-10 10:10:02 +01:00
<constant name="FILE_UPLOAD_STORE_TYPE_MEMORY" value="0" enum="FileUploadStoreType">
2024-03-10 10:24:16 +01:00
Store uploaded files directly in memory.
2024-03-10 10:10:02 +01:00
</constant>
<constant name="FILE_UPLOAD_STORE_TYPE_TEMP_FILES" value="1" enum="FileUploadStoreType">
2024-03-10 10:24:16 +01:00
Store uploaded files as temporary files on disk.
2024-03-10 10:10:02 +01:00
</constant>
2022-08-21 00:40:49 +02:00
</constants>
</class>