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

Function StartServer

http/websocket/server.go:41–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

39var ws *websocket.WsServer
40
41func StartServer() {
42 bactor.SubscribeEvent(message.TOPIC_SAVE_BLOCK_COMPLETE, sendBlock2WSclient)
43 bactor.SubscribeEvent(message.TOPIC_SMART_CODE_EVENT, pushSmartCodeEvent)
44 go func() {
45 ws = websocket.InitWsServer()
46 ws.Start()
47 }()
48}
49func sendBlock2WSclient(v interface{}) {
50 if cfg.DefConfig.Ws.HttpWsPort != 0 {
51 go func() {

Callers 1

initWsFunction · 0.92

Calls 2

InitWsServerFunction · 0.92
StartMethod · 0.65

Tested by

no test coverage detected