using System;

namespace InABox.Rpc
{
    public class RpcTransportExceptionArgs
    {
        public IRpcSession? Session { get; set; }

        public Exception Exception { get; }

        public RpcTransportExceptionArgs(IRpcSession? session, Exception exception)
        {
            Session = session;
            Exception = exception;
        }
    }

    public delegate void RpcTransportExceptionEvent(IRpcTransport transport, RpcTransportExceptionArgs e);
}