put identity name into handshake

canary
Marcus 2021-04-02 10:08:02 -04:00
parent 7b9af3ba47
commit 185aa45e4f
1 changed files with 3 additions and 1 deletions

View File

@ -158,7 +158,9 @@ class STPSocket extends EventEmitter {
handshake() {
const pk = this.identity.publicKey;
const packet = new KeyExchangePacket(pk);
const packet = new KeyExchangePacket(pk, {
name: this.identity.name
});
const buffer = packet.toBuffer();
this.tcpSocket.write(buffer);
}