pull/39/head
Ciro 2022-11-17 19:01:15 -03:00
rodzic cd65043250
commit c7e1efbfe6
13 zmienionych plików z 36 dodań i 10 usunięć

1
docs/_config.yml 100644
Wyświetl plik

@ -0,0 +1 @@
theme: midnight

Wyświetl plik

@ -192,4 +192,6 @@ If you need to access the raw pointer of `libuv` you can use `app.get_native_han
## Preserve data for use after await
HttpRequest object being stack-allocated and only valid in one single callback invocation so only valid in the first "segment" before the first await.
If you just want to preserve headers, url, method, cookies and query string you can use `req.preserve()` to copy all data and keep it in the request object, but will be some performance penality.
If you just want to preserve headers, url, method, cookies and query string you can use `req.preserve()` to copy all data and keep it in the request object, but will be some performance penality.
### Next [Upload and Post](upload-post.md)

Wyświetl plik

@ -36,4 +36,6 @@ async def home(res, req):
```
> You cannot use async inside cork but, you can cork only when you need to send the response after all the async happens
For convinience we have `res.cork_end()`, `ws.cork_send()` that will cork and call end for you, and also `res.render()` that will always response using `res.cork_end()` to send your HTML / Data
For convinience we have `res.cork_end()`, `ws.cork_send()` that will cork and call end for you, and also `res.render()` that will always response using `res.cork_end()` to send your HTML / Data
### Next [Routes](routes.md)

Wyświetl plik

@ -58,3 +58,5 @@ app.run()
If you just wanna to see some more examples you can go to our [examples folder](https://github.com/cirospaciari/socketify.py/tree/main/examples) for more than 25 quick examples.
### Next [Corking Concept](corking.md)

Wyświetl plik

@ -31,3 +31,6 @@ Linux
```bash
apt install libuv1 zlib1g
```
### Next [Getting Started](getting-started.md)

Wyświetl plik

@ -64,4 +64,6 @@ app.listen(
)
app.run()
```
```
### Next [Basics](basics.md)

Wyświetl plik

@ -134,4 +134,6 @@ app.domain("*.google.*").get("/*", google)
#you can also remove an server name
app.remove_server_name("*.google.*")
```
```
### Next [Middlewares](middlewares.md)

Wyświetl plik

@ -1 +1,3 @@
Support is already there, docs Comming soon...
Support is already there, docs Comming soon...
### Next [API Reference](api.md)

Wyświetl plik

@ -27,4 +27,6 @@ app.listen(
)
app.run()
```
```
### Next [Templates](templates.md)

Wyświetl plik

@ -61,4 +61,6 @@ def send_chunk(self, buffer, total_size):
self._lastChunkOffset = self.get_write_offset()
return self._chunkFuture
```
```
### Next [Send File and Static Files](static-files.md)

Wyświetl plik

@ -71,4 +71,6 @@ app.listen(
)
app.run()
```
```
### Next [GraphiQL](graphiQL.md)

Wyświetl plik

@ -89,4 +89,6 @@ async def upload_multiple(res, req):
# We respond when we are done
res.cork_end("Thanks for the data!")
```
```
### Next [Streaming Data](streaming-data.md)

Wyświetl plik

@ -48,4 +48,6 @@ Compressing using shared means that every WebSocket message is an isolated compr
You probably want shared compressor if dealing with larger JSON messages, or 4kb dedicated compressor if dealing with smaller JSON messages and if doing binary messaging you probably want to disable it completely.
idle_timeout is roughly the amount of seconds that may pass between messages. Being idle for more than this, and the connection is severed. This means you should make your clients send small ping messages every now and then, to keep the connection alive. The server will automatically send pings in case it needs to.
idle_timeout is roughly the amount of seconds that may pass between messages. Being idle for more than this, and the connection is severed. This means you should make your clients send small ping messages every now and then, to keep the connection alive. The server will automatically send pings in case it needs to.
### Next [SSL](ssl.md)