code: public static Sink sink(Socket socket) throws IOException {
      if (socket == null) throw new IllegalArgumentException("socket == null");
      AsyncTimeout timeout = timeout(socket);
      Sink sink = sink(socket.getOutputStream(), timeout);
      return timeout.sink(sink);
    }
docs: Returns a sink that writes to {@code socket}. Prefer this over {@link
  #sink(OutputStream)} because this method honors timeouts. When the socket
  write times out, the socket is asynchronously closed by a watchdog thread.