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

Commit

Permalink
Merge pull request #21 from pyropy/add-async-transport-mode
Browse files Browse the repository at this point in the history
Add async transport mode
  • Loading branch information
pyropy authored Jun 17, 2021
2 parents c97f4cb + fa4280e commit 0a511cc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions fastapi_socketio/socket_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from typing import Optional, Union
from fastapi import FastAPI


class SocketManager:
"""
Integrates SocketIO with FastAPI app.
Expand All @@ -23,9 +22,10 @@ def __init__(
mount_location: str = "/ws",
socketio_path: str = "socket.io",
cors_allowed_origins: Union[str, list] = '*',
async_mode: str = "asgi"
) -> None:
# TODO: Change Cors policy based on fastapi cors Middleware
self._sio = socketio.AsyncServer(async_mode="asgi", cors_allowed_origins=cors_allowed_origins)
self._sio = socketio.AsyncServer(async_mode=async_mode, cors_allowed_origins=cors_allowed_origins)
self._app = socketio.ASGIApp(
socketio_server=self._sio, socketio_path=socketio_path
)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from setuptools import setup
import os

VERSION = "0.0.7"
VERSION = "0.0.8"


def get_long_description():
Expand Down

0 comments on commit 0a511cc

Please sign in to comment.