-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
2 changed files
with
63 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,70 @@ | ||
# Releases | ||
|
||
- [0.2.0](#020-2022-10-11) (2022-10-11) | ||
- [0.1.1](#011-2022-09-14) (2022-09-14) | ||
- [0.1.0](#010-2022-09-12) (2022-09-12) | ||
|
||
# [0.2.0](https://github.com/socketio/socket.io-deno/compare/0.1.1...0.2.0) (2022-10-11) | ||
|
||
### Bug Fixes | ||
|
||
- **engine:** properly pause the polling transport during upgrade | ||
([c706741](https://github.com/socketio/socket.io-deno/commit/c706741544e33ca364ef88e3779aa8d4ee3739f0)), | ||
closes [#4](https://github.com/socketio/socket.io-deno/issues/4) | ||
- restore socket.to() and socket.except() methods | ||
([4ce5f64](https://github.com/socketio/socket.io-deno/commit/4ce5f646a95d9dd522fdf3c86951f82d641e3418)), | ||
closes [#3](https://github.com/socketio/socket.io-deno/issues/3) | ||
- **server:** send events once the handshake is completed | ||
([518f534](https://github.com/socketio/socket.io-deno/commit/518f534e1c205b746b1cb21fe76b187dabc96f34)) | ||
|
||
### Features | ||
|
||
- implement catch-all listeners | ||
([333dfdd](https://github.com/socketio/socket.io-deno/commit/333dfdd8d0f8a3409e2f22a765b775f77fb05d85)) | ||
|
||
Syntax: | ||
|
||
```js | ||
io.on("connection", (socket) => { | ||
socket.onAnyIncoming((event, ...args) => { | ||
// ... | ||
}); | ||
|
||
socket.onAnyOutgoing((event, ...args) => { | ||
// ... | ||
}); | ||
}); | ||
``` | ||
|
||
- implement the Redis adapter | ||
([39eaa0e](https://github.com/socketio/socket.io-deno/commit/39eaa0e755cf16d7b099711c5ff759290103bfd3)) | ||
|
||
```js | ||
import { serve } from "https://deno.land/[email protected]/http/server.ts"; | ||
import { | ||
createRedisAdapter, | ||
createRedisClient, | ||
Server, | ||
} from "https://deno.land/x/[email protected]/mod.ts"; | ||
|
||
const [pubClient, subClient] = await Promise.all([ | ||
createRedisClient({ | ||
hostname: "localhost", | ||
}), | ||
createRedisClient({ | ||
hostname: "localhost", | ||
}), | ||
]); | ||
|
||
const io = new Server({ | ||
adapter: createRedisAdapter(pubClient, subClient), | ||
}); | ||
|
||
await serve(io.handler(), { | ||
port: 3000, | ||
}); | ||
``` | ||
|
||
# [0.1.1](https://github.com/socketio/socket.io-deno/compare/0.1.0...0.1.1) (2022-09-14) | ||
|
||
### Bug Fixes | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ Table of content: | |
|
||
```ts | ||
import { serve } from "https://deno.land/[email protected]/http/server.ts"; | ||
import { Server } from "https://deno.land/x/socket_io@0.1.1/mod.ts"; | ||
import { Server } from "https://deno.land/x/socket_io@0.2.0/mod.ts"; | ||
|
||
const io = new Server(); | ||
|
||
|