Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,8 @@ Server.prototype._onWebSocketRequest = function (socket, opts, params) {

// WebSocket tracker should have a shorter interval – default: 2 minutes
response.interval = Math.ceil(self.intervalMs / 1000 / 5)

response.custom = params.custom
}

socket.send(JSON.stringify(response), socket.onSend)
Expand All @@ -458,7 +460,8 @@ Server.prototype._onWebSocketRequest = function (socket, opts, params) {
offer: params.offers[i].offer,
offer_id: params.offers[i].offer_id,
peer_id: common.hexToBinary(params.peer_id),
info_hash: common.hexToBinary(params.info_hash)
info_hash: common.hexToBinary(params.info_hash),
custom: params.custom,
}), peer.socket.onSend)
debug('sent offer to %s from %s', peer.peerId, params.peer_id)
})
Expand All @@ -482,7 +485,8 @@ Server.prototype._onWebSocketRequest = function (socket, opts, params) {
answer: params.answer,
offer_id: params.offer_id,
peer_id: common.hexToBinary(params.peer_id),
info_hash: common.hexToBinary(params.info_hash)
info_hash: common.hexToBinary(params.info_hash),
custom: params.custom,
}), toPeer.socket.onSend)
debug('sent answer to %s from %s', toPeer.peerId, params.peer_id)

Expand Down