bring in low-level socket wrapper methods from pubsub hook.