Connecting to a udp socket in Node.js

I'm writing a javascript/node.js program that receives the scores from a HL/Team Fortress 2 server, but I can't seem to receive the udp packets send by the game server. (I can receive udp packets transmitted by a UDP test tool) I have found a python library that works but it uses socket.connect() before receiving data from the server.

Python snipplet (asyncore used):

self.create_socket(socket.AF_INET, socket.SOCK_DGRAM)
self.bind(('0.0.0.0', 17015))
self.connect((IP of server, 27015))

data = self.recv(1400)

But in node.js I can't seem to connect to a remote address.

My code so far:

var dgram = require('dgram')
var server = dgram.createSocket("udp4");
server.on('message', function (data, rinfo) {
    data = data.toString();
    if (data.startsWith('\xff\xff\xff\xff') && data.endsWith('\n\x00')) {
        console.log(data);
        Logparser(data);
    } else {
        console.log(data);
    }
});
server.bind(17015);

UDP packet captured with wireshark http://pastebin.com/W7i9CV2u

You need to use the addMembership() method to join a multicast group, in UDP you don't connect to servers, a connection is never created and there is no guarantee that you will receive any/all packets. You join a multicast group and receive packets with that group-id that reach your network card, the python method name is misleading.

http://nodejs.org/api/dgram.html#dgram_socket_addmembership_multicastaddress_multicastinterface