[#HTTPServer-BindAndStartListening]
= xref:HTTPServer.adoc[HTTPServer]::BindAndStartListening
:relfileprefix: ../
:mrdocs:

Bind to a new address&colon;port, start listening and add the listen socket to `m&lowbar;listen`&period;

== Synopsis

Declared in `&lt;httpserver&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:util/Expected-0b.adoc[util::Expected&lt;void, std::string&gt;]
BindAndStartListening(xref:CService.adoc[CService] const& to);
----

== Return Value

&lcub;&rcub; or the reason for failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *to* [in]
| Where to bind&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
