#![allow(clippy::unused_async)]
#[cfg(not(target_arch = "wasm32"))]
pub mod atp;
#[cfg(not(target_arch = "wasm32"))]
#[path = "atp/udp/mod.rs"]
pub mod atp_udp;
pub mod dns;
pub mod happy_eyeballs;
pub mod quic_core;
#[cfg(not(target_arch = "wasm32"))]
pub mod quic_native;
#[cfg(not(target_arch = "wasm32"))]
pub mod stun;
#[cfg(all(feature = "quic", not(target_arch = "wasm32")))]
pub mod quic {
pub type QuicConnection = super::quic_native::NativeQuicConnection;
pub type QuicConfig = super::quic_native::NativeQuicConnectionConfig;
pub type QuicError = super::quic_native::NativeQuicConnectionError;
pub type SendStream = super::quic_native::QuicStream;
pub type RecvStream = super::quic_native::QuicStream;
}
mod resolve;
pub mod sys;
pub mod tcp;
mod udp;
#[cfg(unix)]
pub mod unix;
pub mod websocket;
pub mod worker_channel;
#[cfg(not(target_arch = "wasm32"))]
pub use atp::protocol::{
AtpFrameCodec, Frame as AtpFrame, FrameError, FrameHeader, FrameType, ProtocolVersion,
SessionTranscript, TranscriptHash, TranscriptHasher, VarInt, VarIntError,
};
#[cfg(not(target_arch = "wasm32"))]
pub use atp_udp::{
ATP_UDP_DEFAULT_BATCH_SIZE, ATP_UDP_DEFAULT_MAX_PACKET_SIZE, AtpUdpPacket, AtpUdpPressure,
AtpUdpReceivedPacket, AtpUdpRecvBatch, AtpUdpSocket, AtpUdpSocketConfig, AtpUdpSocketProfile,
LabAtpUdpSocket, LabUdpEvent,
};
pub use happy_eyeballs::{HappyEyeballsConfig, connect as happy_eyeballs_connect};
#[cfg(all(feature = "quic", not(target_arch = "wasm32")))]
pub use quic::{
QuicConfig, QuicConnection, QuicError, RecvStream as QuicRecvStream,
SendStream as QuicSendStream,
};
#[cfg(not(target_arch = "wasm32"))]
pub use quic_native::{
AckEvent, AckRange, CryptoLevel, FlowControlError, FlowCredit, KeyUpdateEvent,
NativeQuicConnection, NativeQuicConnectionConfig, NativeQuicConnectionError, PacketNumberSpace,
QuicConnectionState, QuicStream, QuicStreamError, QuicTlsError, QuicTlsMachine,
QuicTransportMachine, RttEstimator, SentPacketMeta, StreamDirection, StreamId, StreamRole,
StreamTable, StreamTableError, TransportError,
};
pub use resolve::{lookup_all, lookup_one};
#[cfg(not(target_arch = "wasm32"))]
pub use stun::{IceCandidate, IceCandidateType, StunClient, StunError, StunMessageType};
#[cfg(target_os = "windows")]
pub use sys::windows::{NamedPipeClient, NamedPipeClientOptions};
pub use tcp::listener::{Incoming, TcpListener};
pub use tcp::socket::TcpSocket;
pub use tcp::split::{OwnedReadHalf, OwnedWriteHalf, ReadHalf, ReuniteError, WriteHalf};
pub use tcp::stream::TcpStream;
pub use tcp::stream::TcpStreamBuilder;
pub use udp::{
RecvStream, SendSink, UDP_RENDEZVOUS_MAX_ATTEMPTS, UDP_RENDEZVOUS_MAX_CANDIDATES,
UDP_RENDEZVOUS_MAX_ID_BYTES, UDP_RENDEZVOUS_NONCE_BYTES, UdpAddressFamily,
UdpBatchCapabilities, UdpBatchIoReport, UdpBufferConfig, UdpBufferTuneReport, UdpCapability,
UdpEndpointObservation, UdpHairpinSupport, UdpInboundDatagram, UdpNatAssessment,
UdpNatConfidence, UdpNatKind, UdpOutboundDatagram, UdpPlatform, UdpRecvBatch,
UdpRendezvousCandidate, UdpRendezvousCandidateKind, UdpRendezvousCandidateSet,
UdpRendezvousSignature, UdpRendezvousValidationError, UdpSocket, UdpSocketCapabilities,
classify_udp_nat, validate_udp_rendezvous_candidates,
};
#[cfg(unix)]
pub use unix::{
Incoming as UnixIncoming, OwnedReadHalf as UnixOwnedReadHalf,
OwnedWriteHalf as UnixOwnedWriteHalf, ReadHalf as UnixReadHalf,
ReuniteError as UnixReuniteError, UnixListener, UnixStream, WriteHalf as UnixWriteHalf,
};
pub use websocket::{
ClientHandshake, CloseCode, Frame, FrameCodec, HandshakeError, Message, Opcode, Role as WsRole,
ServerHandshake, ServerWebSocket, WebSocket, WebSocketAcceptor, WebSocketConfig, WebSocketRead,
WebSocketWrite, WsAcceptError, WsConnectError, WsError, WsReuniteError, WsUrl, apply_mask,
};