listenOn method
Call this method to listen http/https requests an
existing ServerSocket. When the HttpServer is closed,
the HttpServer will just detach itself, closing current
connections but not closing serverSocket
.
Implementation
Future<void> listenOn(io.ServerSocket serverSocket) async {
_server = io.HttpServer.listenOn(serverSocket);
await _listen();
}