Tezos_base_unix.P2p_resolveval resolve_addr_with_peer_id :
default_addr:string ->
default_port:int ->
?passive:bool ->
?warn:bool ->
string ->
(Tezos_base.TzPervasives.P2p_point.Id.t
* Tezos_base.TzPervasives.P2p_peer.Id.t option)
list
Tezos_base.TzPervasives.tzresult
Lwt.tresolve_addr_with_peer_id ~default_addr ~default_port ?passive ?warn addr parses addr to return the corresponding points.
The format of addr can be either an IP address (v4 or v6) or a domain name. If a domain name is provided, a DNS lookup is made (see Unix.getaddrinfo).
Moreover, a peer id can be provided by postfixing the addr with #<peer_id>. The peer id should be provided using the b58 format.
An event is emitted if the DNS lookup returned 0 points and warn is true. If warn is false, no event is emitted. The default is true.
The error Failed_to_parse_address is returned if the parsing failed.
val resolve_addr :
default_addr:string ->
default_port:int ->
?passive:bool ->
?warn:bool ->
string ->
Tezos_base.TzPervasives.P2p_point.Id.t list Tezos_base.TzPervasives.tzresult
Lwt.tresolve_addr is the same as resolve_addr_with_peer_id but no peer id is expected.
A warning event is emitted if a peer_id was provided.