code: func (e *endpoint) resetConnectionLocked(err *tcpip.Error) {
  	e.sendRaw(buffer.VectorisedView{}, header.TCPFlagAck|header.TCPFlagRst, e.snd.sndUna, e.rcv.rcvNxt, 0)
  
  	e.state = stateError
  	e.hardError = err
  }
docs: // resetConnectionLocked sends a RST segment and puts the endpoint in an error
  // state with the given error code. This method must only be called from the
  // protocol goroutine.