Skip to content

Do we have any official documentation about Websockets? #104

Description

We can implement WebSocket in FastAPI like this:

from fastapi import FastAPI, WebSocket

app = FastAPI()
@app.websocket("/ws")
async def websocket_endpoint(websocket: WebSocket):
    await websocket.accept()
    while True:
        data = await websocket.receive_text()
        await websocket.send_text(f"Message text was: {data}")

So, as the title suggests, is there an official way to handle WebSockets in PyNest API?

I tried import WebSocket from nest.core but there's no definition for it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions