Send serialized buffer. Direct call of the method requires knowledge about internals of FBE models serialization. Use it with care!
(serialized int)
| 89 | // Direct call of the method requires knowledge about internals of FBE models serialization. |
| 90 | // Use it with care! |
| 91 | func (s *Sender) SendSerialized(serialized int) (int, error) { |
| 92 | if serialized <= 0 { |
| 93 | return 0, nil |
| 94 | } |
| 95 | |
| 96 | // Shift the send buffer |
| 97 | s.buffer.Shift(serialized) |
| 98 | |
| 99 | // Send the value |
| 100 | sent, err := s.HandlerOnSend.OnSend(s.buffer.Data()[:s.buffer.Size()]) |
| 101 | s.buffer.Remove(0, sent) |
| 102 | return sent, err |
| 103 | } |
no test coverage detected