MCPcopy Create free account
hub / github.com/chronoxor/FastBinaryEncoding / SendBalanceMessage

Method SendBalanceMessage

projects/Go/proto/proto/Sender.go:92–113  ·  view source on GitHub ↗
(value *BalanceMessage)

Source from the content-addressed store, hash-verified

90}
91
92func (s *Sender) SendBalanceMessage(value *BalanceMessage) (int, error) {
93 // Serialize the value into the FBE stream
94 serialized, err := s.balanceMessageModel.Serialize(value)
95 if serialized <= 0 {
96 return 0, errors.New("proto.BalanceMessage serialization failed")
97 }
98 if err != nil {
99 return 0, err
100 }
101 if !s.balanceMessageModel.Verify() {
102 return 0, errors.New("proto.BalanceMessage validation failed")
103 }
104
105 // Log the value
106 if s.Logging() {
107 message := value.String()
108 s.HandlerOnSendLog.OnSendLog(message)
109 }
110
111 // Send the serialized value
112 return s.SendSerialized(serialized)
113}
114
115func (s *Sender) SendAccountMessage(value *AccountMessage) (int, error) {
116 // Serialize the value into the FBE stream

Callers 1

SendMethod · 0.95

Calls 6

LoggingMethod · 0.95
SendSerializedMethod · 0.95
OnSendLogMethod · 0.65
SerializeMethod · 0.45
VerifyMethod · 0.45
StringMethod · 0.45

Tested by

no test coverage detected