start abstract method
Starts the server to handle the given channel. *
- Notice that you can invoke start, startSecure and startOn multiple
- times to handle multiple channels:
-
new StreamServer()
-
..start(port: 80)
-
..startSecure(context, address: "11.22.33.44", port: 443);
- To know which channel a request is received, you can access
- HttpConnect.channel.
-
address
- It can either be a String or an InternetAddress.
- Default: InternetAddress.anyIPv4 (i.e., "0.0.0.0").
- It will cause Stream server to listen all adapters
- IP addresses using IPv4.
-
port
- the port. Default: 8080.
- If port has the value 0 an ephemeral port will be chosen by the system.
- The actual port used can be retrieved using HttpChannel.port.
-
backlog
- specify the listen backlog for the underlying OS listen setup.
- If backlog has the value of 0 (the default) a reasonable value will be chosen
- by the system.
-
zoned
- whether to start the server within a zone
- (i.e.,
runZonedGuarded()
). Default: true.
Implementation
Future<HttpChannel> start({address, int port = 8080, int backlog = 0,
bool v6Only = false, bool shared = false, bool zoned = true});