Closed ghorbani-m closed 2 years ago
@ghorbani-m For decreasing the battery usage i don't dial and connect the peer i just add the peer to PeerStore for later request's. When user ask for send/receive operation connecting and opening the stream happens.
Change Connect
to AddBox
I understand, so we can make it optional so that developers could decide how connect
method works
connect
method can get some parameters like this:
{
connectImmediatly: boolean,
idleTimeout: number,
timeout: number
}
I don't know how much they are feasible.
connect
method always returns true even if the endpoints (boxAddr) are wrong:For example at a local environment all these addresses returns true: Correct address; '/ip4/
192.168.0.200
/tcp/4002/p2p/PeerId.....' Wrong: address: '/ip4/192.168.0.201
/tcp/4002/p2p/PerrtId....'