Switch to using socket directly.