HttpServer

object HttpServer

Provides factory for HttpServer.

Companion
class
class Object
trait Matchable
class Any

Value members

Concrete methods

Gets new instance of server application.

Gets new instance of server application.

def apply(port: Int)(handler: RequestHandler): HttpServer

Creates server at given port using supplied handler.

Creates server at given port using supplied handler.

Value Params
handler

request handler

port

port number

Returns

server

def apply(port: Int, key: File, cert: File)(handler: RequestHandler): HttpServer

Creates secure server at given port using supplied handler.

Creates secure server at given port using supplied handler.

The SSL/TLS server connection is created with supplied key and certificate.

Value Params
cert

public key certificate

handler

request handler

key

private key

port

port number

Returns

server

def apply(host: String, port: Int)(handler: RequestHandler): HttpServer

Creates server at given host and port using supplied handler.

Creates server at given host and port using supplied handler.

Value Params
handler

request handler

host

host address

port

port number

Returns

server

def apply(host: String, port: Int, key: File, cert: File)(handler: RequestHandler): HttpServer

Creates secure server at given host and port using supplied handler.

Creates secure server at given host and port using supplied handler.

The SSL/TLS server connection is created with supplied key and certificate.

Value Params
cert

public key certificate

handler

request handler

host

host address

key

private key

port

port number

Returns

server

def apply(host: InetAddress, port: Int)(handler: RequestHandler): HttpServer

Creates server at given host and port using supplied handler.

Creates server at given host and port using supplied handler.

Value Params
handler

request handler

host

host address

port

port number

Returns

server

def apply(host: InetAddress, port: Int, key: File, cert: File)(handler: RequestHandler): HttpServer

Creates secure server at given host and port using supplied handler.

Creates secure server at given host and port using supplied handler.

The SSL/TLS server connection is created with supplied key and certificate.

Value Params
cert

public key certificate

handler

request handler

host

host address

key

private key

port

port number

Returns

server