---
title: "listen"
sidebar_label: "listen"
description: "Kotlin binding reference: listen."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

//[clika-runtime](../../../index.md)/[io.clika.runtime](../index.md)/[HttpServer](index.md)/[listen](listen.md)

# listen

[common]\
fun [listen](listen.md)(host: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), port: [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html))

Serve on [host](listen.md):[port](listen.md), blocking this thread until [stop](stop.md) is called from another.