QuartzH2Server

io.quartz.QuartzH2Server
See theQuartzH2Server companion object
class QuartzH2Server(HOST: String, PORT: Int, h2IdleTimeOutMs: Int, sslCtx: SSLContext, incomingWinSize: Int, onConnect: Long => IO[Unit], onDisconnect: Long => IO[Unit])

Quartz HTTP/2 server.

Attributes

HOST

the host address of the server

PORT

the port number to bind to

h2IdleTimeOutMs

the maximum idle time in milliseconds before a connection is closed

incomingWinSize

the initial window size for incoming flow control

onConnect

callback function that is called when a connection is established, provides connectionId : Long as an argument

onDisconnect

callback function that is called when a connection is terminated, provides connectionId : Long as an argument

sslCtx

the SSL context to use for secure connections, can be null for non-secure connections

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

def doConnect(ch: IOChannel, idRef: Ref[IO, Long], maxStreams: Int, keepAliveMs: Int, route: Request => IO[Option[Response]], leftOver: Chunk[Byte]): IO[Unit]
def doConnectUpgrade(ch: IOChannel, id: Long, maxStreams: Int, keepAliveMs: Int, route: Request => IO[Option[Response]], buf: Chunk[Byte]): IO[Unit]
def errorHandler(e: Throwable): IO[Unit]
def getHttpHeaderAndLeftover(chunk: Chunk[Byte]): (Headers, Chunk[Byte])
def hostName(address: SocketAddress): String
def protoSwitch(): String
def responseString(): String
def responseStringNo11(): String
def run0(e: ExecutorService, R: HttpRoute, maxThreadNum: Int, maxStreams: Int, keepAliveMs: Int): IO[ExitCode]
def run1(R: HttpRoute, maxThreadNum: Int, maxStreams: Int, keepAliveMs: Int): IO[ExitCode]
def run3(e: ExecutorService, R: HttpRoute, maxThreadNum: Int, maxStreams: Int, keepAliveMs: Int): IO[ExitCode]
def shutdown: IO[Unit]
def start(R: HttpRoute, sync: Boolean): IO[ExitCode]
def startIO(pf: HttpRouteIO, filter: WebFilter, sync: Boolean): IO[ExitCode]

Starts an HTTP server with the given IO-based route and web filter.

Starts an HTTP server with the given IO-based route and web filter.

Attributes

filter

The web filter to apply to incoming requests, defaults to a filter that allows all requests through.

pf

The IO-based HTTP route to serve.

sync

A boolean flag indicating whether the HTTP server should run synchronously or asynchronously.

Returns:

An IO that produces the exit code of the HTTP server.

def startRIO[Env](env: Env, pf: HttpRouteRIO[Env], filter: WebFilter, sync: Boolean): IO[ExitCode]

Starts an HTTP server that handles requests based on the given routing function, using the RIO monad to handle computations that depend on the environment Env.

Starts an HTTP server that handles requests based on the given routing function, using the RIO monad to handle computations that depend on the environment Env.

Attributes

env

the environment required by the routing function.

filter

the filter to pre-process incoming requests (defaults to a pass-through filter).

pf

the partial function that maps requests to RIO computations.

sync

whether to use a synchronous or asynchronous I/O model.

Returns:

An IO that produces the exit code of the HTTP server.

Concrete fields

val header_pair: Regex
val http_line: Regex
var shutdownFlag: Boolean