class CIOHeaders : Headers
An adapter from CIO low-level headers map to ktor Headers interface |
|
class CIOMultipartDataBase : MultiPartData, CoroutineScope
Represents a multipart data object that does parse and convert parts to ktor's PartData |
|
class ConnectionOptions
Represents a parsed |
|
class HttpHeadersMap
A headers map data structure used in CIO |
|
abstract class HttpMessage : Closeable
Represents a base HTTP message type for request and response |
|
sealed class MultipartEvent
Represents a multipart content starting event. Every part need to be completely consumed or released via release |
|
class Request : HttpMessage
Represents an HTTP request |
|
class RequestResponseBuilder
Builds an HTTP request or response |
|
class Response : HttpMessage
Represents an HTTP response |
class ParserException : Exception
An HTTP parser exception |
typealias DecoderJob = WriterJob
Decoder job type |
|
typealias EncoderJob = ReaderJob
Encoder job type |
|
typealias HttpRequestHandler = suspend CoroutineScope.(request: Request, input: ByteReadChannel, output: ByteWriteChannel, upgraded: CompletableDeferred<Boolean>?) -> Unit
HTTP request handler function |
val HttpPipelineCoroutine: CoroutineName
HTTP pipeline coroutine name |
|
val HttpPipelineWriterCoroutine: CoroutineName
HTTP pipeline writer coroutine name |
|
val RequestHandlerCoroutine: CoroutineName
HTTP request handler coroutine name |
suspend fun boundary(boundaryPrefixed: ByteBuffer, input: ByteReadChannel): Boolean
Skip multipart boundary |
|
suspend fun |
|
suspend fun decodeChunked(input: ByteReadChannel, out: ByteWriteChannel): Unit
Chunked stream decoding loop |
|
fun HttpHeadersMap.dumpTo(indent: String, out: Appendable): Unit
Dump header values to out, useful for debugging |
|
suspend fun encodeChunked(output: ByteWriteChannel, coroutineContext: <ERROR CLASS>): EncoderJob
Start chunked stream encoding coroutine suspend fun encodeChunked(output: ByteWriteChannel, input: ByteReadChannel): Unit
Chunked stream encoding loop |
|
fun expectHttpBody(method: HttpMethod, contentLength: Long, transferEncoding: CharSequence?, connectionOptions: ConnectionOptions?, contentType: CharSequence?): Booleanfun expectHttpBody(request: Request): Boolean |
|
fun expectHttpUpgrade(method: HttpMethod, upgrade: CharSequence?, connectionOptions: ConnectionOptions?): Booleanfun expectHttpUpgrade(request: Request): Boolean |
|
fun expectMultipart(headers: HttpHeadersMap): Boolean
Check if we have multipart content |
|
fun |
|
fun parseBoundary(contentType: CharSequence): ByteBuffer
Parse multipart boundary encoded in contentType header value |
|
suspend fun parseHeaders(input: ByteReadChannel): HttpHeadersMap
Parse http headers. Not applicable to request and response status lines. |
|
suspend fun parseHttpBody(contentLength: Long, transferEncoding: CharSequence?, connectionOptions: ConnectionOptions?, input: ByteReadChannel, out: ByteWriteChannel): Unit
Parse HTTP request or response body using contentLength, transferEncoding and connectionOptions writing it to out. Usually doesn't fail but closing out channel with error. suspend fun parseHttpBody(headers: HttpHeadersMap, input: ByteReadChannel, out: ByteWriteChannel): Unit
Parse HTTP request or response body using request/response's headers writing it to out. Usually doesn't fail but closing out channel with error. |
|
fun fun fun |
|
suspend fun parsePart(boundaryPrefixed: ByteBuffer, input: ByteReadChannel, output: ByteWriteChannel, limit: Long = Long.MAX_VALUE): Pair<HttpHeadersMap, Long>
Parse multipart part headers and body. Body bytes will be copied to output but up to limit bytes |
|
suspend fun parsePartBody(boundaryPrefixed: ByteBuffer, input: ByteReadChannel, output: ByteWriteChannel, headers: HttpHeadersMap, limit: Long = Long.MAX_VALUE): Long
Parse multipart part body copying them to output channel but up to limit bytes |
|
suspend fun parsePartHeaders(input: ByteReadChannel): HttpHeadersMap
Parse multipart part headers |
|
suspend fun parsePreamble(boundaryPrefixed: ByteBuffer, input: ByteReadChannel, output: BytePacketBuilder, limit: Long = Long.MAX_VALUE): Long
Parse a multipart preamble |
|
suspend fun parseRequest(input: ByteReadChannel): Request?
Parse an HTTP request line and headers |
|
suspend fun parseResponse(input: ByteReadChannel): Response?
Parse an HTTP response status line and headers |
|
fun |