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

Method SendOrderMessage

projects/Go/proto/protoex/Sender.go:80–101  ·  view source on GitHub ↗
(value *OrderMessage)

Source from the content-addressed store, hash-verified

78}
79
80func (s *Sender) SendOrderMessage(value *OrderMessage) (int, error) {
81 // Serialize the value into the FBE stream
82 serialized, err := s.orderMessageModel.Serialize(value)
83 if serialized <= 0 {
84 return 0, errors.New("protoex.OrderMessage serialization failed")
85 }
86 if err != nil {
87 return 0, err
88 }
89 if !s.orderMessageModel.Verify() {
90 return 0, errors.New("protoex.OrderMessage validation failed")
91 }
92
93 // Log the value
94 if s.Logging() {
95 message := value.String()
96 s.HandlerOnSendLog.OnSendLog(message)
97 }
98
99 // Send the serialized value
100 return s.SendSerialized(serialized)
101}
102
103func (s *Sender) SendBalanceMessage(value *BalanceMessage) (int, error) {
104 // 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