code: func (c *PipeConn) completeRequest(data iodata, deadline *time.Time, overlapped *syscall.Overlapped) (int, error) {
  	if data.err == error_io_incomplete || data.err == syscall.ERROR_IO_PENDING {
  		var timer <-chan time.Time
  		if deadline != nil {
  			if timeDiff := deadline.Sub(time.Now()); timeDiff > 0 {
  				timer = time.After(timeDiff)
  			}
  		}
  		done := make(chan iodata)
  		go func() {
  			n, err := waitForCompletion(c.handle, overlapped)
  			done <- iodata{n, err}
  		}()
  		select {
  		case data = <-done:
  		case <-timer:
  			syscall.CancelIoEx(c.handle, overlapped)
  			data = iodata{0, timeout(c.addr.String())}
  		}
  	}
  	// Windows will produce ERROR_BROKEN_PIPE upon closing
  	// a handle on the other end of a connection. Go RPC
  	// expects an io.EOF error in this case.
  	if data.err == syscall.ERROR_BROKEN_PIPE {
  		data.err = io.EOF
  	}
  	return int(data.n), data.err
  }
docs: // completeRequest looks at iodata to see if a request is pending. If so, it waits for it to either complete or to
  // abort due to hitting the specified deadline. Deadline may be set to nil to wait forever. If no request is pending,
  // the content of iodata is returned.