Skip to content

Commit c2cdad5

Browse files
Jinrong Liangroypat
authored andcommitted
feat: Implement ReadVolatile and WriteVolatile for TcpStream
Add implementations of the ReadVolatile and WriteVolatile traits for std::net::TcpStream by extending the impl_read_write_volatile_for_raw_fd! macro. Suggested-by: Patrick Roy <[email protected]> Signed-off-by: Yi Wang <[email protected]> Signed-off-by: Jinrong Liang <[email protected]>
1 parent 4b8649a commit c2cdad5

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Upcoming version
44

5+
### Added
6+
7+
- \[[#304](https://github.com/rust-vmm/vm-memory/pull/304)\] Implement ReadVolatile and WriteVolatile for TcpStream
8+
59
## \[v0.16.0\]
610

711
### Added

src/io.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ impl WriteVolatile for Stdout {
144144
}
145145

146146
impl_read_write_volatile_for_raw_fd!(std::fs::File);
147+
impl_read_write_volatile_for_raw_fd!(std::net::TcpStream);
147148
impl_read_write_volatile_for_raw_fd!(std::os::unix::net::UnixStream);
148149
impl_read_write_volatile_for_raw_fd!(std::os::fd::OwnedFd);
149150
impl_read_write_volatile_for_raw_fd!(std::os::fd::BorrowedFd<'_>);

0 commit comments

Comments
 (0)