ConnectionOptions

class ConnectionOptions

Represents a parsed Connection header

Constructors

<init>

ConnectionOptions(
    close: Boolean = false,
    keepAlive: Boolean = false,
    upgrade: Boolean = false,
    extraOptions: List<String> = emptyList())

Represents a parsed Connection header

Properties

close

val close: Boolean

true for Connection: close

extraOptions

val extraOptions: List<String>

a list of extra connection header options other than close, keep-alive and upgrade

keepAlive

val keepAlive: Boolean

true for Connection: keep-alive

upgrade

val upgrade: Boolean

true for Connection: upgrade

Functions

equals

fun equals(other: Any?): Boolean

hashCode

fun hashCode(): Int

toString

fun toString(): String

Companion Object Properties

Close

An instance for Connection: close

KeepAlive

val KeepAlive: ConnectionOptions

An instance for Connection: keep-alive

Upgrade

val Upgrade: ConnectionOptions

An instance for Connection: upgrade

Companion Object Functions

parse

fun parse(connection: CharSequence?): ConnectionOptions?

Parse Connection header value