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

Method SendAccountMessage

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

Source from the content-addressed store, hash-verified

113}
114
115func (s *Sender) SendAccountMessage(value *AccountMessage) (int, error) {
116 // Serialize the value into the FBE stream
117 serialized, err := s.accountMessageModel.Serialize(value)
118 if serialized <= 0 {
119 return 0, errors.New("proto.AccountMessage serialization failed")
120 }
121 if err != nil {
122 return 0, err
123 }
124 if !s.accountMessageModel.Verify() {
125 return 0, errors.New("proto.AccountMessage validation failed")
126 }
127
128 // Log the value
129 if s.Logging() {
130 message := value.String()
131 s.HandlerOnSendLog.OnSendLog(message)
132 }
133
134 // Send the serialized value
135 return s.SendSerialized(serialized)
136}

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