scoop:scoop.http:0.1.0
src/native/http2.scoop
Selected production source · src/native/http2.scoop
1
package scoop.http3
@CLayout internal struct NativeHttp2Output(val count: Long, val code: Int, val streamId: Int, val kind: Int)4
@CLayout internal struct NativeHttp2InputProgress(val count: Long, val streamId: Int)6
@Extern(name = "scoop_http2_new") internal fun http2New(server: Int, config: NativeHttp2Config, settings: NativeHttp2Settings, upgrading: Int): ULong7
@Extern(name = "scoop_http2_free") internal fun http2Free(handle: ULong)8
@Extern(name = "scoop_http2_error") internal fun http2Error(handle: ULong): Ptr<Byte>9
@Extern(name = "scoop_http2_receive") internal fun http2Receive(handle: ULong, data: Ptr<Byte>, size: Long, capture: Int): NativeHttpStep10
@Extern(name = "scoop_http2_input_progress_count") internal fun http2InputProgressCount(handle: ULong): Long11
@Extern(name = "scoop_http2_input_progress") internal fun http2InputProgress(handle: ULong, index: Long): NativeHttp2InputProgress12
@Extern(name = "scoop_http2_output") internal fun http2Output(handle: ULong, data: Ptr<Byte>, capacity: Long): NativeHttp2Output13
@Extern(name = "scoop_http2_wants") internal fun http2Wants(handle: ULong, write: Int): Int14
@Extern(name = "scoop_http2_pending") internal fun http2Pending(handle: ULong, id: Int): Int15
@Extern(name = "scoop_http2_buffered") internal fun http2Buffered(handle: ULong): Long16
@Extern(name = "scoop_http2_next") internal fun http2Next(handle: ULong): ULong17
@Extern(name = "scoop_http2_end") internal fun http2End(handle: ULong): Int18
@GCLeaf @Extern(name = "scoop_http2_is_unexpected_eof") internal fun http2IsUnexpectedEof(code: Int): Int19
@Extern(name = "scoop_http2_goaway") internal fun http2Goaway(handle: ULong, last: Int, code: UInt, data: Ptr<Byte>, size: Long): Int20
@Extern(name = "scoop_http2_upgrade") internal fun http2Upgrade(handle: ULong, data: Ptr<Byte>, size: Long, head: Int): Int22
@Extern(name = "scoop_http2_fields_new") internal fun http2FieldsNew(): ULong23
@Extern(name = "scoop_http2_fields_free") internal fun http2FieldsFree(handle: ULong)24
@Extern(name = "scoop_http2_field_add") internal fun http2FieldAdd(handle: ULong, name: Ptr<Byte>, nameSize: Long, value: Ptr<Byte>, valueSize: Long, neverIndex: Int): Int25
@Extern(name = "scoop_http2_request") internal fun http2Request(handle: ULong, fields: ULong, end: Int, length: Long): Int26
@Extern(name = "scoop_http2_response") internal fun http2Response(handle: ULong, id: Int, fields: ULong, status: Int, end: Int, length: Long): Int27
@Extern(name = "scoop_http2_write") internal fun http2Write(handle: ULong, id: Int, data: Ptr<Byte>?, size: Long): NativeHttpStep28
@Extern(name = "scoop_http2_finish") internal fun http2Finish(handle: ULong, id: Int, fields: ULong): Int29
@Extern(name = "scoop_http2_consume") internal fun http2Consume(handle: ULong, id: Int, count: Long): Int30
@Extern(name = "scoop_http2_reset") internal fun http2Reset(handle: ULong, id: Int, code: UInt): Int32
internal fun http2Failure(operation: String, code: Int, detail: String, streamId: Int = 0,33
scope: HttpFailureScope = HttpFailureScope.Operation): HttpException {34
@Unsafe {35
return HttpException(operation, HttpProtocol.Http2, scope, streamId, "nghttp2 1.70.0", code, detail,36
http2IsUnexpectedEof(code) != 0)37
}38
}