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

Method SendBalanceMessage

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

Source from the content-addressed store, hash-verified

101}
102
103func (s *Sender) SendBalanceMessage(value *BalanceMessage) (int, error) {
104 // Serialize the value into the FBE stream
105 serialized, err := s.balanceMessageModel.Serialize(value)
106 if serialized <= 0 {
107 return 0, errors.New("protoex.BalanceMessage serialization failed")
108 }
109 if err != nil {
110 return 0, err
111 }
112 if !s.balanceMessageModel.Verify() {
113 return 0, errors.New("protoex.BalanceMessage validation failed")
114 }
115
116 // Log the value
117 if s.Logging() {
118 message := value.String()
119 s.HandlerOnSendLog.OnSendLog(message)
120 }
121
122 // Send the serialized value
123 return s.SendSerialized(serialized)
124}
125
126func (s *Sender) SendAccountMessage(value *AccountMessage) (int, error) {
127 // 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