Closed nrz123 closed 2 years ago
Hello @nrz123
What is the use case for this? Until the socket is upgraded into a libp2p connection you can't access the peer Id
i could not upgraded into libp2p-connection because i don't know remotePeer when i createListener i want to know who dial to me but when i console.log(maConn.remoteAddr) is undefined
@nrz123 is this still happening?
closing due to lack of response. feel free to reopen if this is still an issue
when i use this code: const ws=new WStar({ upgrader:{ upgradeInbound: maConn => maConn, upgradeOutbound: maConn => maConn, localPeer } }) ws.createListener(socket => { //how get peer-id? console.log(socket) }) how can i get the source peer-id?