code: func (p *Processor) Register(msg proto.Message) uint16 {
  	msgType := reflect.TypeOf(msg)
  	if msgType == nil || msgType.Kind() != reflect.Ptr {
  		log.Fatal("protobuf message pointer required")
  	}
  	if _, ok := p.msgID[msgType]; ok {
  		log.Fatal("message %s is already registered", msgType)
  	}
  	if len(p.msgInfo) >= math.MaxUint16 {
  		log.Fatal("too many protobuf messages (max = %v)", math.MaxUint16)
  	}
  
  	i := new(MsgInfo)
  	i.msgType = msgType
  	p.msgInfo = append(p.msgInfo, i)
  	id := uint16(len(p.msgInfo) - 1)
  	p.msgID[msgType] = id
  	return id
  }
docs: // It's dangerous to call the method on routing or marshaling (unmarshaling)