a tiny wrapper around the node.js socket that makes handling errors and reconnecting simpler