ktor-server-core / io.ktor.routing / port

port

fun Route.port(vararg ports: Int, build: Route.() -> Unit): Route

Create a route to match request port.

When passes it puts request host and port into call parameters by keys HostRouteSelector.HostNameParameter and HostRouteSelector.PortParameter

Parameters

ports - a list of ports to be passed

Exceptions

IllegalArgumentException - if no ports were specified