MCPcopy
hub / github.com/davyxu/cellnet / MessageToID

Function MessageToID

meta.go:255–267  ·  view source on GitHub ↗
(msg interface{})

Source from the content-addressed store, hash-verified

253}
254
255func MessageToID(msg interface{}) int {
256
257 if msg == nil {
258 return 0
259 }
260
261 meta := MessageMetaByMsg(msg)
262 if meta == nil {
263 return 0
264 }
265
266 return int(meta.ID)
267}
268
269func MessageSize(msg interface{}) int {
270

Callers 2

WriteRecvLoggerFunction · 0.92
WriteSendLoggerFunction · 0.92

Calls 1

MessageMetaByMsgFunction · 0.85

Tested by

no test coverage detected