// InitHandler create a handler for websocket and quic servers
InitHandler create a handler for websocket and quic servers
// InitHandler create a handler for websocket and quic servers
func InitHandler(config *util.Config, eventq *channelq.ChannelMessageQueue) {
	once.Do(func() {
		CloudhubHandler = &MessageHandle{
			KeepaliveInterval: config.KeepaliveInterval,
			WriteTimeout:      config.WriteTimeout,
			MessageQueue:      eventq,
			NodeLimit:         config.NodeLimit,
		}
		CloudhubHandler.KeepaliveChannel = make(map[string]chan struct{})
		CloudhubHandler.Handlers = []HandleFunc{CloudhubHandler.KeepaliveCheckLoop, CloudhubHandler.MessageWriteLoop}
		CloudhubHandler.initServerEntries()
	})
}
func InitHandler ( config * util . Config , eventq * channelq . ChannelMessageQueue ) { once . Do ( func ( ) { CloudhubHandler = & MessageHandle { KeepaliveInterval : config . KeepaliveInterval , WriteTimeout : config . WriteTimeout , MessageQueue : eventq , NodeLimit : config . NodeLimit , } CloudhubHandler . KeepaliveChannel = make ( map [ string ] chan struct { } ) CloudhubHandler . Handlers = [ ] HandleFunc { CloudhubHandler . KeepaliveCheckLoop , CloudhubHandler . MessageWriteLoop } CloudhubHandler . initServerEntries ( ) } ) }
InitHandler create a handler for websocket and quic servers
InitHandler create a handler for websocket and quic servers