code: func (c *Conn) sendAlertLocked(err alert) error {
  	switch err {
  	case alertNoRenegotiation, alertCloseNotify:
  		c.tmp[0] = alertLevelWarning
  	default:
  		c.tmp[0] = alertLevelError
  	}
  	c.tmp[1] = byte(err)
  	c.writeRecord(recordTypeAlert, c.tmp[0:2])
  	// closeNotify is a special case in that it isn't an error:
  	if err != alertCloseNotify {
  		return c.out.setErrorLocked(&net.OpError{Op: "local error", Err: err})
  	}
  	return nil
  }
docs: // sendAlert sends a TLS alert message.
  // c.out.Mutex <= L.