startOn abstract method

HttpChannel startOn(
  1. ServerSocket socket, {
  2. bool zoned = true,
})

Starts the server to an existing socket. *

  • Notice that you can invoke start, startSecure and startOn multiple
  • times to handle multiple channels:
  • new StreamServer()
    
  •   ..start(port: 80)
    
  •   ..startSecure(address: "11.22.33.44", port: 443)
    
  •   ..startOn(fooSocket);
    
  • To know which channel a request is received, you can access
  • HttpConnect.channel.
  • Unlike start, when the channel or the server is closed, the server
  • will just detach itself, but not closing socket.
    • zoned - whether to start the server within a zone (i.e., runZoned())
  • Default: true.

Implementation

HttpChannel startOn(ServerSocket socket, {bool zoned = true});