listener

An open network socket that waits for and accepts incoming connections on an address and port.

In more detail

A server creates one when it starts listening and closes it when shutting down, so no new connections arrive while existing requests finish. In-memory test tools can exercise request handling without opening a listener at all.

Example

Go: http.Server.ListenAndServe creates the listener; Shutdown closes it first

Related terms

Taught in

References