Skip to content
This repository was archived by the owner on Apr 4, 2024. It is now read-only.

Commit 0a511cc

Browse files
authoredJun 17, 2021
Merge pull request #21 from pyropy/add-async-transport-mode
Add async transport mode
2 parents c97f4cb + fa4280e commit 0a511cc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
 

‎fastapi_socketio/socket_manager.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
from typing import Optional, Union
33
from fastapi import FastAPI
44

5-
65
class SocketManager:
76
"""
87
Integrates SocketIO with FastAPI app.
@@ -23,9 +22,10 @@ def __init__(
2322
mount_location: str = "/ws",
2423
socketio_path: str = "socket.io",
2524
cors_allowed_origins: Union[str, list] = '*',
25+
async_mode: str = "asgi"
2626
) -> None:
2727
# TODO: Change Cors policy based on fastapi cors Middleware
28-
self._sio = socketio.AsyncServer(async_mode="asgi", cors_allowed_origins=cors_allowed_origins)
28+
self._sio = socketio.AsyncServer(async_mode=async_mode, cors_allowed_origins=cors_allowed_origins)
2929
self._app = socketio.ASGIApp(
3030
socketio_server=self._sio, socketio_path=socketio_path
3131
)

‎setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from setuptools import setup
22
import os
33

4-
VERSION = "0.0.7"
4+
VERSION = "0.0.8"
55

66

77
def get_long_description():

0 commit comments

Comments
 (0)
This repository has been archived.