HttpServer.listenOn constructor

HttpServer.listenOn(
  1. ServerSocket serverSocket
)

Attaches the HTTP server to an existing ServerSocket. When the HttpServer is closed, the HttpServer will just detach itself, closing current connections but not closing serverSocket.

Implementation

factory HttpServer.listenOn(ServerSocket serverSocket) =>
    new _HttpServer.listenOn(serverSocket);

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.13.0/dart-io/HttpServer/HttpServer.listenOn.html