(msg *ServerComMessage)
| 1362 | } |
| 1363 | |
| 1364 | func (s *Session) serializeAndUpdateStats(msg *ServerComMessage) any { |
| 1365 | dataSize, data := s.serialize(msg) |
| 1366 | if dataSize >= 0 { |
| 1367 | statsAddHistSample("OutgoingMessageSize", float64(dataSize)) |
| 1368 | } |
| 1369 | return data |
| 1370 | } |
| 1371 | |
| 1372 | func (s *Session) serialize(msg *ServerComMessage) (int, any) { |
| 1373 | if s.proto == GRPC { |
no test coverage detected