Wed, 03 Jul 2024 20:01:31 +0200
Version 0.4.2. Removed the components/websocket server and switched to the official http and websockets server. This server will also recover if the wifi connection disconnects and reconnects.
0 | 1 | /** |
2 | * @file task_http.h | |
3 | * @brief HTTP and Websocket server functions. | |
4 | */ | |
5 | ||
6 | #ifndef _TASK_HTTP_H | |
7 | #define _TASK_HTTP_H | |
8 | ||
9 | ||
10 | /** | |
142
1f7069278fe7
Version 0.4.2. Removed the components/websocket server and switched to the official http and websockets server. This server will also recover if the wifi connection disconnects and reconnects.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
11 | * @brief Send text to client with the set number. |
1f7069278fe7
Version 0.4.2. Removed the components/websocket server and switched to the official http and websockets server. This server will also recover if the wifi connection disconnects and reconnects.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
12 | * @param num The client connection number. |
1f7069278fe7
Version 0.4.2. Removed the components/websocket server and switched to the official http and websockets server. This server will also recover if the wifi connection disconnects and reconnects.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
13 | * @param msg The message to send. |
1f7069278fe7
Version 0.4.2. Removed the components/websocket server and switched to the official http and websockets server. This server will also recover if the wifi connection disconnects and reconnects.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
14 | * @param len The length of the message to send. |
1f7069278fe7
Version 0.4.2. Removed the components/websocket server and switched to the official http and websockets server. This server will also recover if the wifi connection disconnects and reconnects.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
15 | * @return 1 if message send. |
0 | 16 | */ |
142
1f7069278fe7
Version 0.4.2. Removed the components/websocket server and switched to the official http and websockets server. This server will also recover if the wifi connection disconnects and reconnects.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
17 | int ws_server_send_text_client(int num, char* msg); |
1f7069278fe7
Version 0.4.2. Removed the components/websocket server and switched to the official http and websockets server. This server will also recover if the wifi connection disconnects and reconnects.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
18 | |
1f7069278fe7
Version 0.4.2. Removed the components/websocket server and switched to the official http and websockets server. This server will also recover if the wifi connection disconnects and reconnects.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
19 | |
1f7069278fe7
Version 0.4.2. Removed the components/websocket server and switched to the official http and websockets server. This server will also recover if the wifi connection disconnects and reconnects.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
20 | /** |
1f7069278fe7
Version 0.4.2. Removed the components/websocket server and switched to the official http and websockets server. This server will also recover if the wifi connection disconnects and reconnects.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
21 | * @brief Sends text to all clients with the set url. |
1f7069278fe7
Version 0.4.2. Removed the components/websocket server and switched to the official http and websockets server. This server will also recover if the wifi connection disconnects and reconnects.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
22 | * @param msg The message to send. |
1f7069278fe7
Version 0.4.2. Removed the components/websocket server and switched to the official http and websockets server. This server will also recover if the wifi connection disconnects and reconnects.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
23 | * @return The number of clients the message was send to. |
1f7069278fe7
Version 0.4.2. Removed the components/websocket server and switched to the official http and websockets server. This server will also recover if the wifi connection disconnects and reconnects.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
24 | */ |
1f7069278fe7
Version 0.4.2. Removed the components/websocket server and switched to the official http and websockets server. This server will also recover if the wifi connection disconnects and reconnects.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
25 | int ws_server_send_text_clients(char* msg); |
1f7069278fe7
Version 0.4.2. Removed the components/websocket server and switched to the official http and websockets server. This server will also recover if the wifi connection disconnects and reconnects.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
26 | |
1f7069278fe7
Version 0.4.2. Removed the components/websocket server and switched to the official http and websockets server. This server will also recover if the wifi connection disconnects and reconnects.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
27 | |
1f7069278fe7
Version 0.4.2. Removed the components/websocket server and switched to the official http and websockets server. This server will also recover if the wifi connection disconnects and reconnects.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
28 | /** |
1f7069278fe7
Version 0.4.2. Removed the components/websocket server and switched to the official http and websockets server. This server will also recover if the wifi connection disconnects and reconnects.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
29 | * @brief Install the HTTP/Websocket server. |
1f7069278fe7
Version 0.4.2. Removed the components/websocket server and switched to the official http and websockets server. This server will also recover if the wifi connection disconnects and reconnects.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
30 | */ |
1f7069278fe7
Version 0.4.2. Removed the components/websocket server and switched to the official http and websockets server. This server will also recover if the wifi connection disconnects and reconnects.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
31 | void install_http_server(void); |
0 | 32 | |
33 | #endif |