Size returns a message size in bytes.
()
| 840 | |
| 841 | // Size returns a message size in bytes. |
| 842 | func (m *Msg) Size() int { |
| 843 | if m.wsz != 0 { |
| 844 | return m.wsz |
| 845 | } |
| 846 | hdr, _ := m.headerBytes() |
| 847 | return len(m.Subject) + len(m.Reply) + len(hdr) + len(m.Data) |
| 848 | } |
| 849 | |
| 850 | func (m *Msg) headerBytes() ([]byte, error) { |
| 851 | var hdr []byte |
nothing calls this directly
no test coverage detected