MCPcopy
hub / github.com/olahol/melody / writeMessage

Method writeMessage

session.go:24–35  ·  view source on GitHub ↗
(message envelope)

Source from the content-addressed store, hash-verified

22}
23
24func (s *Session) writeMessage(message envelope) {
25 if s.closed() {
26 s.melody.errorHandler(s, ErrWriteClosed)
27 return
28 }
29
30 select {
31 case s.output <- message:
32 default:
33 s.melody.errorHandler(s, ErrMessageBufferFull)
34 }
35}
36
37func (s *Session) writeRaw(message envelope) error {
38 if s.closed() {

Callers 9

WriteMethod · 0.95
WriteBinaryMethod · 0.95
CloseMethod · 0.95
CloseWithMsgMethod · 0.95
WriteWithDeadlineMethod · 0.95
exitMethod · 0.80
broadcastMethod · 0.80
TestErrSessionClosedFunction · 0.80

Calls 1

closedMethod · 0.95

Tested by 1

TestErrSessionClosedFunction · 0.64