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

Method SendOrderMessage

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

Source from the content-addressed store, hash-verified

67}
68
69func (s *Sender) SendOrderMessage(value *OrderMessage) (int, error) {
70 // Serialize the value into the FBE stream
71 serialized, err := s.orderMessageModel.Serialize(value)
72 if serialized <= 0 {
73 return 0, errors.New("proto.OrderMessage serialization failed")
74 }
75 if err != nil {
76 return 0, err
77 }
78 if !s.orderMessageModel.Verify() {
79 return 0, errors.New("proto.OrderMessage validation failed")
80 }
81
82 // Log the value
83 if s.Logging() {
84 message := value.String()
85 s.HandlerOnSendLog.OnSendLog(message)
86 }
87
88 // Send the serialized value
89 return s.SendSerialized(serialized)
90}
91
92func (s *Sender) SendBalanceMessage(value *BalanceMessage) (int, error) {
93 // 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