Skip to content
Merged
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
9 changes: 9 additions & 0 deletions crates/shadowsocks/src/net/udp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use std::{
target_os = "linux",
target_os = "android",
target_os = "macos",
target_os = "ios",
target_os = "freebsd"
))]
use std::{
Expand All @@ -20,6 +21,7 @@ use std::{
target_os = "linux",
target_os = "android",
target_os = "macos",
target_os = "ios",
target_os = "freebsd"
))]
use futures::{future, ready};
Expand All @@ -28,6 +30,7 @@ use pin_project::pin_project;
target_os = "linux",
target_os = "android",
target_os = "macos",
target_os = "ios",
target_os = "freebsd"
))]
use tokio::io::Interest;
Expand All @@ -46,6 +49,7 @@ use super::{
target_os = "linux",
target_os = "android",
target_os = "macos",
target_os = "ios",
target_os = "freebsd"
))]
pub struct BatchSendMessage<'a> {
Expand All @@ -59,6 +63,7 @@ pub struct BatchSendMessage<'a> {
target_os = "linux",
target_os = "android",
target_os = "macos",
target_os = "ios",
target_os = "freebsd"
))]
pub struct BatchRecvMessage<'a> {
Expand Down Expand Up @@ -154,6 +159,7 @@ impl UdpSocket {
target_os = "linux",
target_os = "android",
target_os = "macos",
target_os = "ios",
target_os = "freebsd"
))]
pub fn poll_batch_send(
Expand All @@ -179,6 +185,7 @@ impl UdpSocket {
target_os = "linux",
target_os = "android",
target_os = "macos",
target_os = "ios",
target_os = "freebsd"
))]
pub async fn batch_send(&self, msgs: &mut [BatchSendMessage<'_>]) -> io::Result<usize> {
Expand All @@ -189,6 +196,7 @@ impl UdpSocket {
#[cfg(any(
target_os = "linux",
target_os = "android",
target_os = "ios",
target_os = "macos",
target_os = "freebsd"
))]
Expand All @@ -215,6 +223,7 @@ impl UdpSocket {
target_os = "linux",
target_os = "android",
target_os = "macos",
target_os = "ios",
target_os = "freebsd"
))]
pub async fn batch_recv(&self, msgs: &mut [BatchRecvMessage<'_>]) -> io::Result<usize> {
Expand Down