MCPcopy Create free account
hub / github.com/DNAProject/DNA / IsValidMsg

Method IsValidMsg

http/websocket/websocket/server.go:292–303  ·  view source on GitHub ↗
(reqMsg map[string]interface{})

Source from the content-addressed store, hash-verified

290 }
291}
292func (self *WsServer) IsValidMsg(reqMsg map[string]interface{}) bool {
293 if _, ok := reqMsg["Hash"].(string); !ok && reqMsg["Hash"] != nil {
294 return false
295 }
296 if _, ok := reqMsg["Addr"].(string); !ok && reqMsg["Addr"] != nil {
297 return false
298 }
299 if _, ok := reqMsg["Assetid"].(string); !ok && reqMsg["Assetid"] != nil {
300 return false
301 }
302 return true
303}
304func (self *WsServer) OnDataHandle(curSession *session.Session, bysMsg []byte, r *http.Request) bool {
305
306 var req = make(map[string]interface{})

Callers 1

OnDataHandleMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected