Struct bdk::blockchain::compact_filters::Peer [−][src]
pub struct Peer { /* fields omitted */ }
compact_filters
only.Expand description
A Bitcoin peer
Implementations
pub fn connect<A: ToSocketAddrs>(
address: A,
mempool: Arc<Mempool>,
network: Network
) -> Result<Self, CompactFiltersError>
[src]
pub fn connect<A: ToSocketAddrs>(
address: A,
mempool: Arc<Mempool>,
network: Network
) -> Result<Self, CompactFiltersError>
[src]Connect to a peer over a plaintext TCP connection
This function internally spawns a new thread that will monitor incoming messages from the peer, and optionally reply to some of them transparently, like pings
pub fn connect_proxy<T: ToTargetAddr, P: ToSocketAddrs>(
target: T,
proxy: P,
credentials: Option<(&str, &str)>,
mempool: Arc<Mempool>,
network: Network
) -> Result<Self, CompactFiltersError>
[src]
pub fn connect_proxy<T: ToTargetAddr, P: ToSocketAddrs>(
target: T,
proxy: P,
credentials: Option<(&str, &str)>,
mempool: Arc<Mempool>,
network: Network
) -> Result<Self, CompactFiltersError>
[src]Connect to a peer through a SOCKS5 proxy, optionally by using some credentials, specified
as a tuple of (username, password)
This function internally spawns a new thread that will monitor incoming messages from the peer, and optionally reply to some of them transparently, like pings
Return the VersionMessage
sent by the peer
Return the Bitcoin Network
in use
Return the mempool used by this peer
Return whether or not the peer is still connected
Send a raw Bitcoin message to the peer
pub fn recv(
&self,
wait_for: &'static str,
timeout: Option<Duration>
) -> Result<Option<NetworkMessage>, CompactFiltersError>
[src]
pub fn recv(
&self,
wait_for: &'static str,
timeout: Option<Duration>
) -> Result<Option<NetworkMessage>, CompactFiltersError>
[src]Waits for a specific incoming Bitcoin message, optionally with a timeout
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Peer
impl !UnwindSafe for Peer
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V