Ejemplo n.º 1
0
        public virtual void ExceptionLog(string errorMessage)
        {
            var args = new TunnelEventArg
            {
                Event        = TunnelEvent.Exception,
                ListenerId   = Listener.Id,
                TunnelId     = Id,
                Source       = _localEp,
                Destination  = _remoteEp,
                ErrorMessage = errorMessage
            };

            OnSocketEvent?.Invoke(this, args);
        }
Ejemplo n.º 2
0
        public virtual void SocketEvent(TunnelEvent eventType, int dataSize = 0, byte[] data = null)
        {
            var args = new TunnelEventArg
            {
                Event       = eventType,
                ListenerId  = Listener.Id,
                TunnelId    = Id,
                Source      = _localEp,
                Destination = _remoteEp,
                DataSize    = dataSize,
                Data        = data
            };

            OnSocketEvent?.Invoke(this, args);
        }