namespace InABox.Rpc
{
    public enum RpcTransportCloseEventType
    {
        Closed,
        Error
    }

    public class RpcTransportCloseArgs
    {
        public IRpcSession? Session { get; set; }

        public RpcTransportCloseEventType Type { get; }

        public RpcTransportCloseArgs(IRpcSession? session, RpcTransportCloseEventType type)
        {
            Session = session;
            Type = type;
        }
    }

    public delegate void RpcTransportCloseEvent(IRpcTransport transport, RpcTransportCloseArgs e);
}