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 firstRelated terms
- http.Server — The Go type that listens on a network address and serves HTTP requests through a handler, with fields for limits such as timeouts.
- port — A number from 1 to 65535 that picks out one service on a machine, such as 22 for SSH or 80 for plain web traffic.
- Server.Shutdown — The http.Server method that stops accepting new connections and waits for active requests to finish, up to the deadline of the context you pass.
Taught in
- Serving HTTP with net/http Server — Concurrent Systems Programming with Go
- Graceful Shutdown on SIGTERM — Concurrent Systems Programming with Go