You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 6, 2021. It is now read-only.
Here is my code:
HttpServer.bind(InternetAddress.anyIPv4, port).then((server) {
print('Servindo em ${server.address}:${server.port}');
server.listen((HttpRequest request) {
handleGetRequest(request); // check de URL
request.response
..close();
});
});
I don't know why, but some times, the program stop with:
FormatException: Invalid port (at character 16) http://0.0.0.0:81login.cgi
Sure that I am using port 81, but the port does not import.
This error occur even if there are anybody connecting.
Debuging the app I can see that the program is waiting for a connection in the line
server.listen((HttpRequest request)
From time to time, simply gives the message without anyone connecting
Another fact is that I am not put
import 'package:http_server/http_server.dart';
because when I put, I receive message that Target of URI doesn't exist