MCPcopy
hub / github.com/semaphoreui/semaphore / write

Method write

api/sockets/handler.go:104–113  ·  view source on GitHub ↗

write writes a message with the given message type and payload.

(mt int, payload []byte)

Source from the content-addressed store, hash-verified

102
103// write writes a message with the given message type and payload.
104func (c *connection) write(mt int, payload []byte) error {
105
106 deadline := tz.Now().Add(writeWait)
107
108 if err := c.ws.SetWriteDeadline(deadline); err != nil {
109 c.logWarn(err, "Cannot set write deadline")
110 }
111
112 return c.ws.WriteMessage(mt, payload)
113}
114
115// writePump pumps messages from the hub to the websocket connection.
116func (c *connection) writePump() {

Callers 15

writePumpMethod · 0.95
utf16EndFunction · 0.80
base64EndFunction · 0.80
simpleEndFunction · 0.80
fromFunction · 0.80
writeFloatFunction · 0.80
writeDoubleFunction · 0.80
ondataFunction · 0.80
readableAddChunkFunction · 0.80
readableAddChunkFunction · 0.80

Calls 3

logWarnMethod · 0.95
NowFunction · 0.92
AddMethod · 0.80

Tested by

no test coverage detected