async_coap/datagram/mod.rs
1// Copyright 2019 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15
16//! Generic, datagram-based CoAP backend, with associated socket abstractions.
17//!
18//! The actual backend is [`DatagramLocalEndpoint`]. It uses an asynchronous datagram
19//! socket that implements the trait [`AsyncDatagramSocket`] and all of its required dependency
20//! traits ([`DatagramSocketTypes`], [`AsyncSendTo`], [`AsyncRecvFrom`], [`MulticastSocket`],
21//! [`Send`], and [`Sync`]).
22//!
23//! [`DatagramLocalEndpoint`]: datagram::DatagramLocalEndpoint
24//! [`DatagramSocketTypes`]: datagram::DatagramSocketTypes
25//! [`AsyncDatagramSocket`]: datagram::AsyncDatagramSocket
26//! [`AsyncSendTo`]: datagram::AsyncSendTo
27//! [`AsyncRecvFrom`]: datagram::AsyncRecvFrom
28//! [`AsyncRecvFrom`]: datagram::AsyncRecvFrom
29//! [`MulticastSocket`]: datagram::MulticastSocket
30//!
31use super::*;
32
33mod async_socket;
34pub use async_socket::{
35 AsyncDatagramSocket, AsyncRecvFrom, AsyncSendTo, DatagramSocketTypes, MulticastSocket,
36 NextRecvFromFuture, NextSendToFuture,
37};
38
39mod allow_udp_socket;
40pub use allow_udp_socket::AllowStdUdpSocket;
41
42mod loopback_socket;
43pub use loopback_socket::LoopbackSocket;
44pub use loopback_socket::LoopbackSocketAddr;
45
46mod null_socket;
47pub use null_socket::NullSocket;
48pub use null_socket::NullSocketAddr;
49
50mod response_tracker;
51use response_tracker::*;
52
53mod send_future;
54use send_future::*;
55
56mod remote_endpoint;
57pub use remote_endpoint::*;
58
59mod local_endpoint;
60pub use local_endpoint::*;
61
62mod inbound_context;
63pub use inbound_context::*;