File tree 1 file changed +6
-4
lines changed 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 9
9
10
10
🦕 A simple WebSocket library like [ ws of node.js library] ( https://github.com/websockets/ws ) for deno
11
11
12
+ * Deno >= 1.2
13
+
12
14
# Quick Start
13
15
14
16
## Example Demo
18
20
Server side
19
21
20
22
``` bash
21
- $ deno run --allow-net https://deno.land/x/websocket@v0.0.2 /example/server.ts
23
+ $ deno run --allow-net https://deno.land/x/websocket@v0.0.3 /example/server.ts
22
24
```
23
25
24
26
Client side
25
27
26
28
``` bash
27
- $ deno run --allow-net https://deno.land/x/websocket@v0.0.2 /example/client.ts
29
+ $ deno run --allow-net https://deno.land/x/websocket@v0.0.3 /example/client.ts
28
30
ws connected! (type ' close' to quit)
29
31
> something
30
32
```
@@ -34,7 +36,7 @@ ws connected! (type 'close' to quit)
34
36
Server side
35
37
36
38
``` typescript
37
- import { WebSocket , WebSocketServer } from " https://deno.land/x/websocket@v0.0.2 /mod.ts" ;
39
+ import { WebSocket , WebSocketServer } from " https://deno.land/x/websocket@v0.0.3 /mod.ts" ;
38
40
39
41
const wss = new WebSocketServer (8080 );
40
42
wss .on (" connection" , function (ws : WebSocket ) {
@@ -49,7 +51,7 @@ wss.on("connection", function (ws: WebSocket) {
49
51
Client side
50
52
51
53
``` typescript
52
- import { WebSocket } from " https://deno.land/x/websocket@v0.0.2 /mod.ts" ;
54
+ import { WebSocket } from " https://deno.land/x/websocket@v0.0.3 /mod.ts" ;
53
55
const endpoint = " ws://127.0.0.1:8080" ;
54
56
const ws: WebSocket = new WebSocket (endpoint );
55
57
ws .on (" open" , function () {
You can’t perform that action at this time.
0 commit comments