You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: WEBSOCKET.md
+30-47Lines changed: 30 additions & 47 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,54 +2,41 @@
2
2
3
3
## Overview
4
4
5
-
LlamaTale now supports WebSocket connections for the web browser interface, providing a modern bidirectional communication channel between the client and server. This is an alternative to the traditional Server-Sent Events (EventSource) approach.
5
+
LlamaTale uses WebSocket connections for the web browser interface in both single-player (IF) mode and multi-player (MUD) mode, providing a modern bidirectional communication channel between the client and server.
6
6
7
7
## Features
8
8
9
9
-**Bidirectional Communication**: WebSocket enables real-time, two-way communication between the browser and server
10
-
-**Reduced Latency**: Direct WebSocket communication can be faster than HTTP polling or EventSource
10
+
-**Reduced Latency**: Direct WebSocket communication is faster than HTTP polling or EventSource
11
11
-**Modern Stack**: Uses FastAPI and uvicorn for a modern, async Python web framework
12
-
-**Backward Compatibility**: The JavaScript client automatically falls back to EventSource if WebSocket is not available
12
+
-**Unified Approach**: Both IF and MUD modes now use the same WebSocket-based architecture
13
13
14
14
## Requirements
15
15
16
-
Install the additional dependencies:
16
+
Install the required dependencies:
17
17
18
18
```bash
19
19
pip install fastapi websockets uvicorn
20
20
```
21
21
22
-
Or install all requirements including WebSocket support:
22
+
Or install all requirements:
23
23
24
24
```bash
25
25
pip install -r requirements.txt
26
26
```
27
27
28
28
## Usage
29
29
30
-
### Starting a Game with WebSocket Support
31
-
32
-
To enable WebSocket mode, use the `--websocket` flag when starting a game with the web interface:
0 commit comments