Enum internet2::transport::socket_addr::RemoteSocketAddr
source · [−]#[non_exhaustive]
pub enum RemoteSocketAddr {
Ftcp(InetSocketAddr),
Zmq(SocketAddr),
Http(InetSocketAddr),
Smtp(InetSocketAddr),
}
Expand description
Represents a connection to a generic remote peer operating with LNP protocol
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Ftcp(InetSocketAddr)
Framed TCP socket connection, that may be served either over plain IP, IPSec or Tor v3
Zmq(SocketAddr)
Microservices connected using ZeroMQ protocol remotely. Can be used only with TCP-based ZMQ
Http(InetSocketAddr)
End-to-end encryption over web connection: think of this as LN protocol streamed over HTTP
Smtp(InetSocketAddr)
SMTP connection: asynchronous end-to-end-over SMTP information transfer which is useful for ultra-low bandwidth non-real-time connections like satellite networks
Implementations
sourceimpl RemoteSocketAddr
impl RemoteSocketAddr
pub fn with_ip_addr(proto: FramingProtocol, ip: IpAddr, port: u16) -> Self
pub fn with_socket_addr(proto: FramingProtocol, addr: SocketAddr) -> Self
pub fn with_inet_addr(
proto: FramingProtocol,
addr: InetSocketAddr
) -> Result<Self, NoOnionSupportError>
pub fn framing_protocol(&self) -> FramingProtocol
Trait Implementations
sourceimpl Clone for RemoteSocketAddr
impl Clone for RemoteSocketAddr
sourcefn clone(&self) -> RemoteSocketAddr
fn clone(&self) -> RemoteSocketAddr
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for RemoteSocketAddr
impl Debug for RemoteSocketAddr
sourceimpl Display for RemoteSocketAddr
impl Display for RemoteSocketAddr
sourceimpl From<RemoteNodeAddr> for RemoteSocketAddr
impl From<RemoteNodeAddr> for RemoteSocketAddr
sourcefn from(addr: RemoteNodeAddr) -> RemoteSocketAddr
fn from(addr: RemoteNodeAddr) -> RemoteSocketAddr
Converts to this type from the input type.
sourceimpl From<RemoteSocketAddr> for InetSocketAddr
impl From<RemoteSocketAddr> for InetSocketAddr
sourcefn from(rsa: RemoteSocketAddr) -> Self
fn from(rsa: RemoteSocketAddr) -> Self
Converts to this type from the input type.
sourceimpl FromStr for RemoteSocketAddr
impl FromStr for RemoteSocketAddr
sourceimpl Hash for RemoteSocketAddr
impl Hash for RemoteSocketAddr
sourceimpl Ord for RemoteSocketAddr
impl Ord for RemoteSocketAddr
sourceimpl PartialEq<RemoteSocketAddr> for RemoteSocketAddr
impl PartialEq<RemoteSocketAddr> for RemoteSocketAddr
sourcefn eq(&self, other: &RemoteSocketAddr) -> bool
fn eq(&self, other: &RemoteSocketAddr) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &RemoteSocketAddr) -> bool
fn ne(&self, other: &RemoteSocketAddr) -> bool
This method tests for !=
.
sourceimpl PartialOrd<RemoteSocketAddr> for RemoteSocketAddr
impl PartialOrd<RemoteSocketAddr> for RemoteSocketAddr
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl StrictDecode for RemoteSocketAddr
impl StrictDecode for RemoteSocketAddr
sourcefn strict_decode<D: Read>(d: D) -> Result<Self, Error>
fn strict_decode<D: Read>(d: D) -> Result<Self, Error>
Decode with the given std::io::Read
instance; must either
construct an instance or return implementation-specific error type. Read more
sourcefn strict_deserialize(data: impl AsRef<[u8]>) -> Result<Self, Error>
fn strict_deserialize(data: impl AsRef<[u8]>) -> Result<Self, Error>
Tries to deserialize byte array into the current type using
StrictDecode::strict_decode
Read more
sourceimpl StrictEncode for RemoteSocketAddr
impl StrictEncode for RemoteSocketAddr
sourcefn strict_encode<E: Write>(&self, e: E) -> Result<usize, Error>
fn strict_encode<E: Write>(&self, e: E) -> Result<usize, Error>
Encode with the given std::io::Write
instance; must return result
with either amount of bytes encoded – or implementation-specific
error type. Read more
sourcefn strict_serialize(&self) -> Result<Vec<u8, Global>, Error>
fn strict_serialize(&self) -> Result<Vec<u8, Global>, Error>
Serializes data as a byte array using StrictEncode::strict_encode
function Read more
sourceimpl TryFrom<Url> for RemoteSocketAddr
impl TryFrom<Url> for RemoteSocketAddr
sourceimpl UrlString for RemoteSocketAddr
impl UrlString for RemoteSocketAddr
sourcefn url_scheme(&self) -> &'static str
fn url_scheme(&self) -> &'static str
Returns full URL scheme string (i.e. including :
or ://
parts)
corresponding to the provided address Read more
sourcefn to_url_string(&self) -> String
fn to_url_string(&self) -> String
Returns URL string representation for a given node or socket address. If
you need full URL address, please use Url::from()
instead (this
will require url
feature for LNP/BP Core Library). Read more
impl Copy for RemoteSocketAddr
impl Eq for RemoteSocketAddr
impl StructuralEq for RemoteSocketAddr
impl StructuralPartialEq for RemoteSocketAddr
Auto Trait Implementations
impl RefUnwindSafe for RemoteSocketAddr
impl Send for RemoteSocketAddr
impl Sync for RemoteSocketAddr
impl Unpin for RemoteSocketAddr
impl UnwindSafe for RemoteSocketAddr
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more