// New creates new Web socket server
New creates new Web socket server
// New creates new Web socket server
func New(config *config.Config, permissionProvider PermissionProvider) (server *Server, err error) {
	log.Debug("Create VIS server")
	server = &Server{clients: make(map[*wsserver.Client]*clientInfo), permissionProvider: permissionProvider}
	if server.dataProvider, err = dataprovider.New(config); err != nil {
		return nil, err
	}
	if server.wsServer, err = wsserver.New("VIS", config.ServerURL, config.VISCert, config.VISKey, server); err != nil {
		return nil, err
	}
	return server, nil
}
func New ( config * config . Config , permissionProvider PermissionProvider ) ( server * Server , err error ) { log . Debug ( " " ) server = & Server { clients : make ( map [ * wsserver . Client ] * clientInfo ) , permissionProvider : permissionProvider } if server . dataProvider , err = dataprovider . New ( config ) ; err != nil { return nil , err } if server . wsServer , err = wsserver . New ( " " , config . ServerURL , config . VISCert , config . VISKey , server ) ; err != nil { return nil , err } return server , nil }
New creates new Web socket server
New creates new Web socket server