MCPcopy
hub / github.com/tinode/chat / sendMessageGrpc

Method sendMessageGrpc

server/hdl_grpc.go:76–87  ·  view source on GitHub ↗
(msg any)

Source from the content-addressed store, hash-verified

74}
75
76func (sess *Session) sendMessageGrpc(msg any) bool {
77 if len(sess.send) > sendQueueLimit {
78 logs.Err.Println("grpc: outbound queue limit exceeded", sess.sid)
79 return false
80 }
81 statsInc("OutgoingMessagesGrpcTotal", 1)
82 if err := grpcWrite(sess, msg); err != nil {
83 logs.Err.Println("grpc: write", sess.sid, err)
84 return false
85 }
86 return true
87}
88
89func (sess *Session) writeGrpcLoop() {
90 defer func() {

Callers 1

writeGrpcLoopMethod · 0.95

Calls 3

statsIncFunction · 0.85
grpcWriteFunction · 0.85
PrintlnMethod · 0.80

Tested by

no test coverage detected