Skip to content

Commit

Permalink
Improved doc
Browse files Browse the repository at this point in the history
  • Loading branch information
aslze committed Jun 6, 2024
1 parent 3ed6eec commit 13cb927
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ With CMmake 3.14+, instead of using `find_package()`, you can download and build

```cmake
include(FetchContent)
FetchContent_Declare(asl URL https://github.com/aslze/asl/archive/1.11.10.zip)
FetchContent_Declare(asl URL https://github.com/aslze/asl/archive/1.11.11.zip)
FetchContent_MakeAvailable(asl)
```

Expand Down Expand Up @@ -345,7 +345,7 @@ With a recent CMake (3.14+) you can also build mbedTLS together with ASL as subp
set(ASL_TLS ON)
set(ENABLE_PROGRAMS OFF CACHE BOOL "") # skip samples
FetchContent_Declare(mbedtls URL https://github.com/Mbed-TLS/mbedtls/archive/v3.2.1.zip)
FetchContent_Declare(asl URL https://github.com/aslze/asl/archive/1.11.10.zip)
FetchContent_Declare(asl URL https://github.com/aslze/asl/archive/1.11.11.zip)
FetchContent_MakeAvailable(mbedtls asl)
```

Expand Down
6 changes: 3 additions & 3 deletions doc/asl.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ div.fragment {

code {
font-family: monaco, consolas, monospace, fixed;
font-size: 12px;
font-size: 14px;
}

.params .paramdir {
Expand All @@ -33,8 +33,8 @@ code {

div.line {
font-family: monaco, consolas, monospace, fixed;
font-size: 12px;
min-height: 13px;
font-size: 14px;
min-height: 14px;
line-height: 1.6;
text-wrap: unrestricted;
white-space: -moz-pre-wrap; /* Moz */
Expand Down
6 changes: 5 additions & 1 deletion include/asl/Http.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class File;

/**
The components of a URL plus some utility static functions
\ingroup HTTP
*/
struct ASL_API Url
{
Expand Down Expand Up @@ -120,6 +121,7 @@ struct HttpSink

/**
Base class of HttpRequest and HttpResponse with common functionality.
\ingroup HTTP
*/

class ASL_API HttpMessage
Expand Down Expand Up @@ -245,7 +247,7 @@ An HTTP request that servers can read from.
An HttpRequest has a method (such as GET or POST), optional headers, and optional body. The body can be a
String, a ByteArray or a Var. In the case of a Var it will be encoded as JSON and the request content type
header automatically set.
\ingroup HTTP
\sa HttpServer
*/
class ASL_API HttpRequest : public HttpMessage
Expand Down Expand Up @@ -399,6 +401,7 @@ class ASL_API HttpRequest : public HttpMessage

/**
An HTTP response that clients can read and servers write.
\ingroup HTTP
\sa HttpServer
\sa Http
*/
Expand Down Expand Up @@ -516,6 +519,7 @@ Using **IPv6** addresses is supported with square brackets in the host part `[ip
~~~
auto res = Http::get("http://[::1]:80/path");
~~~
\ingroup HTTP
*/

class ASL_API Http
Expand Down
2 changes: 1 addition & 1 deletion include/asl/HttpServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class RestServer : public HttpServer
A server like that will respond to requests such as `/api/clients/132337` or `/api/icon?id=12`.
Each request is handled in a separate thread. So, you should probably use mutexes for synchronization.
\ingroup HTTP
*/

class ASL_API HttpServer: public SocketServer
Expand Down
2 changes: 2 additions & 0 deletions include/asl/WebSocket.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ To connect to a TLS secure server, use the "wss:" protocol:
~~~
ws.connect("wss://some-encrypted-websocketserver:443");
~~~
\ingroup HTTP
*/

class ASL_API WebSocket
Expand Down Expand Up @@ -154,6 +155,7 @@ function in the HTTP server and only start that one.
httpserver.link(wsserver);
httpserver.start();
~~~
\ingroup HTTP
*/

class ASL_API WebSocketServer: public SocketServer
Expand Down

0 comments on commit 13cb927

Please sign in to comment.