public Observer(ReactiveSocket socket, string listenerName, int bufferSize)
        {
            this.socket       = socket;
            this.listenerName = listenerName;
            this.bufferSize   = bufferSize;

            var protocol = new ByteChannel(socket, bufferSize);

            // Here we hook the "echo" prototocol
            protocol.Receiver.Subscribe(
                b => {
                try {
                    TCPSocketListenerService.onNewMessage(b, listenerName);
                }
                catch (Exception e) {
                    OmniusInfo.Log($"Chyba při zpracování socketu: {listenerName} ({e})", OmniusLogSource.Nexus, null, null);
                }
            },
                e => {
                OmniusInfo.Log($"Chyba při zpracování socketu: {listenerName} ({e})", OmniusLogSource.Nexus, null, null);
            }
                );
        }
 public void OnData(byte[] data)
 {
     TCPSocketListenerService.onNewMessage(data, listenerName);
 }