public void On(string ev, SocketIoEventCallback eventCallback) { if (!_handlers.ContainsKey(ev)) { _handlers[ev] = eventCallback; } else { _handlers[ev] += eventCallback; } }
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; }