Exemplo n.º 1
0
func (bw *Reader) readNonStrictNameType() (wire.Envelope, int64, error) {
	var e wire.Envelope

	name, off, err := bw.readString(0)
	if err != nil {
		return e, off, err
	}
	e.Name = name

	typeID, off, err := bw.readByte(off)
	if err != nil {
		return e, off, err
	}
	e.Type = wire.EnvelopeType(typeID)

	return e, off, nil
}
Exemplo n.º 2
0
func (m multiplexedOutboundProtocol) EncodeEnveloped(e wire.Envelope, w io.Writer) error {
	e.Name = m.Service + ":" + e.Name
	return m.Protocol.EncodeEnveloped(e, w)
}