start method
void
start()
Implementation
void start() async {
final server = await HttpServer.bind('localhost', 8080);
print('Server started on port 8080');
await for (var request in server) {
if (WebSocketTransformer.isUpgradeRequest(request)) {
handleWebSocket(request);
} else {
// Handle regular HTTP requests
// ...
}
}
}