Open
Description
Current description for class dart:io:WebSocket is quite short.
Please, specify the following:
- The WebSockets specification and version (probably some draft) which is implemented by dart:io:WebSocket class. This is important for heterogeneous communications. The other side (which might be not Dart) should know what expect.
- Which protocols and extensions are supported?
- Whether messages (especially
List<int>
) are transfered without splitting or joining with another messages - The WebSocket life cycle, like
readyState
(?) isCONNECTING
after call toconnect
,OPEN
after future returned byconnect
completes, etc. (BTWCONNECTING
seems to be redundant in this case). - How the
readyState
of paired instance is affected, when WebSocket is closed or closing - If
done
event is received on WebSocket (which implements Stream) is it necessary toclose
the WebSocket explicitly? - Will peer instance receive
done
event after call toclose
? - WebSocket implements StreamSink, however only
String
andList<int>
are allowed as events, which formally violates contract of StreamSink. What will happen if events other thanString
andList<int>
are supplied to methodadd
? Why it is not possible to send events of some simple types like int, bool, Map, etc?