示例#1
0
        public static void InitializeSignalR(string baseUrl, string hubName, Action onConnected, Action <string> onReceived, Action onReconnected, Action onDisconnected, Action <Exception> onError)
        {
            if (_internalSignalR != null)
            {
                return;
            }

            _internalSignalR                 = new PlayFabSignalR(onConnected);
            _internalSignalR.OnReceived     += onReceived;
            _internalSignalR.OnReconnected  += onReconnected;
            _internalSignalR.OnDisconnected += onDisconnected;
            _internalSignalR.OnError        += onError;

            _internalSignalR.Start(baseUrl, hubName);
        }