Skip to content

Commit

Permalink
Websockets (#37)
Browse files Browse the repository at this point in the history
* Working echo websockets server
Written a simple example of a websocket server that echoes the messages received from the user.
It still doesn't handle particular cases of the ASGI spec like subprotocols and closing connections.

* Use system python version in pkg-config

* Raise IOError when websocket connection is closed

* Complete implementation of websocket asgi spec

* Fix clang-format error

* Remove websockets from fastapi tests

* Integration tests for websockets using socketio

* Use body length in response buffer for better conversion between c and go

* Fix copy_pystring
  • Loading branch information
mliezun authored Aug 16, 2024
1 parent 1ed00f0 commit 2a1d30c
Show file tree
Hide file tree
Showing 14 changed files with 744 additions and 73 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/integration_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
tool-name: ['flask', 'fastapi', 'simple', 'simple_async']
tool-name: ['flask', 'fastapi', 'simple', 'simple_async', 'socketio']
python-version: ['3.9', '3.10', '3.11', '3.12']
env:
GOEXPERIMENT: cgocheck2
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ Supports both WSGI and ASGI, which means you can run all types of frameworks lik

## Quickstart

```
CGO_ENABLED=1 xcaddy build --with github.com/mliezun/caddy-snake
```

#### Requirements

- Python >= 3.9 + dev files
Expand Down
Loading

0 comments on commit 2a1d30c

Please sign in to comment.