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

Method SendAccountMessage

projects/Go/proto/protoex/Sender.go:126–147  ·  view source on GitHub ↗
(value *AccountMessage)

Source from the content-addressed store, hash-verified

124}
125
126func (s *Sender) SendAccountMessage(value *AccountMessage) (int, error) {
127 // Serialize the value into the FBE stream
128 serialized, err := s.accountMessageModel.Serialize(value)
129 if serialized <= 0 {
130 return 0, errors.New("protoex.AccountMessage serialization failed")
131 }
132 if err != nil {
133 return 0, err
134 }
135 if !s.accountMessageModel.Verify() {
136 return 0, errors.New("protoex.AccountMessage validation failed")
137 }
138
139 // Log the value
140 if s.Logging() {
141 message := value.String()
142 s.HandlerOnSendLog.OnSendLog(message)
143 }
144
145 // Send the serialized value
146 return s.SendSerialized(serialized)
147}

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