Exemple #1
0
 public void On(string ev, SocketIoEventCallback eventCallback)
 {
     if (!_handlers.ContainsKey(ev))
     {
         _handlers[ev] = eventCallback;
     }
     else
     {
         _handlers[ev] += eventCallback;
     }
 }
Exemple #2
0
        public void Off(string ev, SocketIoEventCallback eventCallback)
        {
            if (!_handlers.ContainsKey(ev))
            {
                                #if SOCKET_IO_DEBUG
                debugMethod.Invoke("[SocketIO] No callbacks registered for event: " + ev);
                                #endif
                return;
            }

            _handlers[ev] -= eventCallback;
        }