]> git.feebdaed.xyz Git - 0xmirror/tokio.git/commit
refactor: introduce constants for default addresses and improve error handling in...
authorjinronga <52482860+jinronga@users.noreply.github.com>
Tue, 25 Nov 2025 06:44:41 +0000 (14:44 +0800)
committerGitHub <noreply@github.com>
Tue, 25 Nov 2025 06:44:41 +0000 (08:44 +0200)
commit963b6317540e3d9408ef67e81ea528b7d0c5675c
tree3b2586120f05deb465f20299e9b1ea857b921f31
parent9a1b076c0084e2bca8558818bffd2273ec5ae5bd
refactor: introduce constants for default addresses and improve error handling in TCP examples (#7741)

- Added `DEFAULT_ADDR` constant to `chat.rs` and `echo-tcp.rs` for better maintainability.
- Enhanced error logging in `connect-tcp.rs` and `echo-tcp.rs` to include connection addresses.
- Improved peer management in `chat.rs` by automatically cleaning up disconnected peers.
examples/chat.rs
examples/connect-tcp.rs
examples/echo-tcp.rs