mirror of
https://github.com/webtorrent/bittorrent-tracker.git
synced 2024-12-13 10:56:25 +00:00
parent
d56dd26950
commit
4c3c950056
@ -7,8 +7,6 @@ var common = require('./common')
|
||||
function parseUdpRequest (msg, rinfo) {
|
||||
if (msg.length < 16) throw new Error('received packet is too short')
|
||||
|
||||
if (rinfo.family !== 'IPv4') throw new Error('udp tracker does not support IPv6')
|
||||
|
||||
var params = {
|
||||
connectionId: msg.slice(0, 8), // 64-bit
|
||||
action: msg.readUInt32BE(8),
|
||||
@ -63,8 +61,6 @@ function parseUdpRequest (msg, rinfo) {
|
||||
return params
|
||||
}
|
||||
|
||||
// HELPER FUNCTIONS
|
||||
|
||||
var TWO_PWR_32 = (1 << 16) * 2
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user