This will create a new peer exchange with this peer using the given socket, and register the peer as a message listener.
746747748749750751752753754755756
channel.close(); return; } peer.register(this); peer.bind(channel); } this.connected.put(peer.getHexPeerId(), peer); peer.register(this.torrent); logger.debug("New peer connection with {} [{}/{}].",