1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#![deny(
missing_docs,
dead_code,
trivial_casts,
trivial_numeric_casts,
unsafe_code,
unused_import_braces,
unused_qualifications
)]
#![cfg_attr(not(feature = "std"), no_std)]
#[cfg(feature = "std")]
extern crate core;
#[cfg(feature = "alloc")]
extern crate alloc;
pub(crate) mod atomic;
mod portal;
mod router;
mod workers;
pub(crate) use portal::*;
pub(crate) use router::*;
pub(crate) use workers::*;
mod transport;
pub use transport::*;
use ockam_core::compat::net::SocketAddr;
use ockam_core::Result;
use ockam_transport_core::TransportError;
pub const TCP: u8 = 1;
fn parse_socket_addr(s: impl Into<String>) -> Result<SocketAddr> {
Ok(s.into()
.parse()
.map_err(|_| TransportError::InvalidAddress)?)
}