오류 수정
This commit is contained in:
@@ -538,7 +538,7 @@ async def health_check():
|
|||||||
|
|
||||||
@app.websocket("/ws/{client_id}")
|
@app.websocket("/ws/{client_id}")
|
||||||
async def websocket_endpoint(websocket: WebSocket, client_id: str):
|
async def websocket_endpoint(websocket: WebSocket, client_id: str):
|
||||||
\"\"\"WebSocket 연결 엔드포인트.
|
"""WebSocket 연결 엔드포인트.
|
||||||
|
|
||||||
클라이언트→서버 지원 프로토콜:
|
클라이언트→서버 지원 프로토콜:
|
||||||
{"type": "ping"} → {"type": "pong"}
|
{"type": "ping"} → {"type": "pong"}
|
||||||
@@ -548,7 +548,7 @@ async def websocket_endpoint(websocket: WebSocket, client_id: str):
|
|||||||
{"type": "get_chart", "stock_code": "...", "period": "D", "limit": 200}
|
{"type": "get_chart", "stock_code": "...", "period": "D", "limit": 200}
|
||||||
→ {"type": "chart_data", ...}
|
→ {"type": "chart_data", ...}
|
||||||
그 외 메시지 → echo
|
그 외 메시지 → echo
|
||||||
\"\"\"
|
"""
|
||||||
await websocket_manager.connect(websocket, client_id)
|
await websocket_manager.connect(websocket, client_id)
|
||||||
try:
|
try:
|
||||||
while True:
|
while True:
|
||||||
|
|||||||
Reference in New Issue
Block a user