code: func (conn *Conn) getSerial() uint32 {
  	conn.serialLck.Lock()
  	defer conn.serialLck.Unlock()
  	n := conn.nextSerial
  	for conn.serialUsed[n] {
  		n++
  	}
  	conn.serialUsed[n] = true
  	conn.nextSerial = n + 1
  	return n
  }
docs: // getSerial returns an unused serial.