using System; using System.Collections.Generic; using System.Security.Principal; using System.Threading; using System.Threading.Tasks; using EmbedIO.Routing; using EmbedIO.Sessions; using EmbedIO.Utilities; using EmbedIO.WebSockets; namespace EmbedIO { /// /// Represents a HTTP context implementation, i.e. a HTTP context as seen internally by EmbedIO. /// This API mainly supports the EmbedIO infrastructure; it is not intended to be used directly from your code, /// unless to address specific needs in the implementation of EmbedIO plug-ins (e.g. modules). /// /// public interface IHttpContextImpl : IHttpContext { /// /// Gets or sets a used to stop processing of this context. /// This API supports the EmbedIO infrastructure and is not intended to be used directly from your code. /// new CancellationToken CancellationToken { get; set; } /// /// Gets or sets the route matched by the requested URL path. /// new RouteMatch Route { get; set; } /// /// Gets or sets the session proxy associated with this context. /// This API supports the EmbedIO infrastructure and is not intended to be used directly from your code. /// /// /// An interface. /// new ISessionProxy Session { get; set; } /// /// Gets or sets the user. /// This API supports the EmbedIO infrastructure and is not intended to be used directly from your code. /// new IPrincipal User { get; set; } /// /// Gets or sets a value indicating whether compressed request bodies are supported. /// This API supports the EmbedIO infrastructure and is not intended to be used directly from your code. /// /// new bool SupportCompressedRequests { get; set; } /// /// Gets the MIME type providers. /// This API supports the EmbedIO infrastructure and is not intended to be used directly from your code. /// MimeTypeProviderStack MimeTypeProviders { get; } /// /// Flushes and closes the response stream, then calls any registered close callbacks. /// This API supports the EmbedIO infrastructure and is not intended to be used directly from your code. /// /// void Close(); /// /// Asynchronously handles a WebSockets opening handshake /// and returns a newly-created interface. /// This API supports the EmbedIO infrastructure and is not intended to be used directly from your code. /// /// The requested WebSocket sub-protocols. /// The accepted WebSocket sub-protocol, /// or the empty string is no sub-protocol has been agreed upon. /// Size of the receive buffer. /// The keep-alive interval. /// A used to stop the server. /// /// An interface. /// Task AcceptWebSocketAsync( IEnumerable requestedProtocols, string acceptedProtocol, int receiveBufferSize, TimeSpan keepAliveInterval, CancellationToken cancellationToken); } }