Пример #1
0
func (m *initMessage) write(w *typed.WriteBuffer) error {
	w.WriteUint16(m.Version)
	w.WriteUint16(uint16(len(m.initParams)))

	for k, v := range m.initParams {
		w.WriteLen16String(k)
		w.WriteLen16String(v)
	}

	return w.Err()
}
Пример #2
0
func (m *errorMessage) write(w *typed.WriteBuffer) error {
	w.WriteByte(byte(m.errCode))
	w.WriteUint32(m.id)
	w.WriteLen16String(m.message)
	return w.Err()
}
Пример #3
0
func (m *errorMessage) write(w *typed.WriteBuffer) error {
	w.WriteSingleByte(byte(m.errCode))
	m.tracing.write(w)
	w.WriteLen16String(m.message)
	return w.Err()
}