Skip to content

Commit

Permalink
chore: Batch*Message document
Browse files Browse the repository at this point in the history
  • Loading branch information
zonyitoo committed Aug 3, 2024
1 parent 9d97bd4 commit 15b00a2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/shadowsocks/src/net/udp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,11 @@ use super::{
target_os = "freebsd"
))]
pub struct BatchSendMessage<'a> {
/// Optional target address
pub addr: Option<SocketAddr>,
/// Data to be transmitted
pub data: &'a [IoSlice<'a>],
/// Output result. The number of bytes sent by `batch_send`
pub data_len: usize,
}

Expand All @@ -67,8 +70,11 @@ pub struct BatchSendMessage<'a> {
target_os = "freebsd"
))]
pub struct BatchRecvMessage<'a> {
/// Peer address
pub addr: SocketAddr,
/// Data buffer for receiving
pub data: &'a mut [IoSliceMut<'a>],
/// Output result. The number of bytes received by `batch_recv`
pub data_len: usize,
}

Expand Down

0 comments on commit 15b00a2

Please sign in to comment.