mirror of https://github.com/vacp2p/nim-libp2p.git
make things public
This commit is contained in:
parent
054bd365af
commit
682fecc395
|
@ -15,7 +15,7 @@ const DefaultReadSize: uint = 64*1024
|
||||||
type
|
type
|
||||||
Connection* = ref object of LPStream
|
Connection* = ref object of LPStream
|
||||||
peerInfo*: PeerInfo
|
peerInfo*: PeerInfo
|
||||||
stream: LPStream
|
stream*: LPStream
|
||||||
|
|
||||||
proc newConnection*(stream: LPStream): Connection =
|
proc newConnection*(stream: LPStream): Connection =
|
||||||
## create a new Connection for the specified async reader/writer
|
## create a new Connection for the specified async reader/writer
|
||||||
|
@ -88,12 +88,11 @@ proc writeLp*(s: Connection, msg: string | seq[byte]) {.async.} =
|
||||||
buf.finish()
|
buf.finish()
|
||||||
result = s.write(buf.buffer)
|
result = s.write(buf.buffer)
|
||||||
|
|
||||||
method getPeerInfo* (c: Connection): Future[PeerInfo] {.base, async.} =
|
method getPeerInfo*(c: Connection): Future[PeerInfo] {.base, async.} =
|
||||||
## get up to date peer info
|
## get up to date peer info
|
||||||
## TODO: implement PeerInfo refresh over identify
|
## TODO: implement PeerInfo refresh over identify
|
||||||
discard
|
discard
|
||||||
|
|
||||||
method getObservedAddrs(c: Connection): Future[seq[MultiAddress]] {.base,
|
method getObservedAddrs*(c: Connection): Future[MultiAddress] {.base, async.} =
|
||||||
async.} =
|
|
||||||
## get resolved multiaddresses for the connection
|
## get resolved multiaddresses for the connection
|
||||||
discard
|
discard
|
||||||
|
|
Loading…
Reference in New Issue