Took a while to notice... the connection event is emmited on io.sockets. In your code this would be
socket.sockets.on('connection', function (client) {
client.send("hello")
console.log("hello", client)
})
You should use io instead of socket as the var name to avoid this confusion.