deprecated_overflow_gateway.../server/server.go
crusader 5070f1809b ing
2017-11-09 20:09:18 +09:00

25 lines
459 B
Go

package server
import (
cwf "git.loafle.net/commons_go/websocket_fasthttp"
"git.loafle.net/overflow/overflow_gateway_app/servlet/web"
)
func New() cwf.Server {
sh := newServerHandler()
registerWebServlet(sh)
s := cwf.New(sh)
return s
}
func registerWebServlet(sh ServerHandler) {
webEntry, wsh := web.NewSocketHandler()
wsubh := web.NewSubscriberHandler(webEntry)
sh.RegisterSocketHandler(webEntry, wsh)
sh.RegisterSubscriberHandler(wsubh)
}