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

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

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

# listenAsync

[common]\
fun [listenAsync](listenAsync.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](listenAsync.md):[port](listenAsync.md) on a background thread; returns once the server accepts.