tuweni / org.apache.tuweni.hobbits / HobbitsTransport / createHTTPEndpoint

createHTTPEndpoint

fun createHTTPEndpoint(id: String = "default", networkInterface: String = "0.0.0.0", port: Int = 9337, requestURI: String? = null, tls: Boolean = false, handler: (Message) -> Unit, portUpdateListener: (Int) -> Unit = {}): Unit (source)

Creates a new endpoint over http.

Parameters

networkInterface - the network interface to bind the endpoint to

port - the port to serve traffic from

requestURI - the request URI path to match

tls - whether the endpoint should be secured using TLS

handler - function called when a message is received