Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "async_smux"
version = "0.3.4"
version = "0.4.0"
authors = ["black-binary <blackbinary@qq.com>"]
description = "Asynchronous smux multiplexing library"
license = "MIT"
Expand Down
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,15 @@ The worker exits when:
sink is closed. It also works without the worker being polled — useful
in test setups or sync teardown paths.

`MuxStream` supports TCP-style half-close. Calling
`AsyncWriteExt::shutdown()` sends FIN and closes only the local write
direction; reads remain open until the peer sends its FIN. Likewise, a
peer FIN produces read EOF without preventing a response from being
written. Dropping a stream drains writes already accepted by
`poll_write`, sends FIN if needed, and releases the local stream handle.
The wire format is unchanged; a peer must also interpret FIN as directional
EOF to send data after receiving it.

## Configuration

```rust,ignore
Expand Down Expand Up @@ -107,7 +116,7 @@ VERSION(1B) | CMD(1B) | LENGTH(2B LE) | STREAMID(4B LE) | DATA(LENGTH)
VERSION: 1
CMD:
SYN(0) open stream (LENGTH must be 0)
FIN(1) close stream (LENGTH must be 0)
FIN(1) close sender's write direction (LENGTH must be 0)
PSH(2) payload
NOP(3) keep-alive (LENGTH must be 0; STREAMID is 0)
```
Expand Down
Loading
Loading