Node.js TCP server/client, using JSON for messaging