code: void becomeConnected(Sink sink, Socket socket) {
      checkState(this.sink == null, "AsyncSink's becomeConnected should only be called once.");
      this.sink = checkNotNull(sink, "sink");
      this.socket = checkNotNull(socket, "socket");
    }
docs: Sets the actual sink. It is allowed to call write / flush operations on the sink iff calling
  this method is scheduled in the executor. The socket is needed for closing.
  
  <p>should only be called once by thread of executor.