Newer
Older
BlackoutClient / Assets / Best HTTP / Source / Core / IProtocol.cs
@Mark Mark on 30 Jan 2020 751 bytes Added Best HTTP 2 plugin
using System;

namespace BestHTTP.Core
{
    public struct HostConnectionKey
    {
        public readonly string Host;
        public readonly string Connection;

        public HostConnectionKey(string host, string connection)
        {
            this.Host = host;
            this.Connection = connection;
        }

        public override string ToString()
        {
            return string.Format("[HostConnectionKey Host: '{0}', Connection: '{1}']", this.Host, this.Connection);
        }
    }

    public interface IProtocol : IDisposable
    {
        HostConnectionKey ConnectionKey { get; }

        bool IsClosed { get; }

        void HandleEvents();

        void CancellationRequested();
    }
}