-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.library-iotriagedIssue has been triaged by sub teamIssue has been triaged by sub teamtype-documentationA request to add or improve documentationA request to add or improve documentation
Description
The following minimal code example demonstrates that apparently you cannot use Socket.addError
: It throws Unsupported operation: Cannot send errors on sockets
. (run with dart 3.5.3 on a mac)
import 'dart:io';
void main() async {
int port = 33333;
ServerSocket serverSocket = await ServerSocket.bind(InternetAddress.anyIPv6, port);
serverSocket.listen((socket) async {
socket.addError("error");
});
await Socket.connect("127.0.0.1", port);
await Future.delayed(Duration(seconds: 1));
}
Is this a bug, and if not, should this be documented in the documentation? (Edit: Ok, I realized that Socket
is abstract, so maybe it makes no sense to describe implementation details in its doc...) There addError
just redirects to the doc of IOSink
, from which the method was inherited.
Metadata
Metadata
Assignees
Labels
area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.library-iotriagedIssue has been triaged by sub teamIssue has been triaged by sub teamtype-documentationA request to add or improve documentationA request to add or improve documentation