On 10 avr. 2013, at 15:13, Nilsson, Claes1 wrote:
• Align syntax and semantics as much as possible with Web Sockets. In the future an API supporting UDP, TCP and Web Sockets might be an option. However, note that security is more of a concern for UDP and TCP sockets than for Web Sockets. The current Web Sockets API is available to browser web pages, while the Raw Socket API is only available to trusted applications running in the secure Web System Apps execution environment.
For more precision syntax alignment includes:
• UDPSocket
ReceivedUDPEvent Should be renamed UDPMessageEvent and extend MessageEvent*
o Consider replacing the UDP examples in order not to describe functionality that can be achieved with another W3C API, i.e. the DAP Network Service Discovery API.
The example might be a RTP implementation (Real-time Transport Protocol) in JS in the context of a packaged a VoIP Web App
• TCPSocket
ReceivedTCPEvent should be replaced by MessageEvent*
• Both UDP and TCP
There is no information about the expected interfaces for the close event
CloseEvent interface should be inspired by, or directly refer to, the Web Socket defined CloseEvent http://www.w3.org/TR/websockets/#event-definitions
As Mounir mentionned it, this API as the others proposed by this working group should consider implementing the DOM Future interface: http://dom.spec.whatwg.org/#futures
TCPSocket, UDPSocket, and TCPSocketServer should implement the Future interface: http://dom.spec.whatwg.org/#future
Note: for some Event interfaces, W3C recommendations sometimes also provide the EventInit interface (cf CloseEventInit)
Should it be defined for Raw Socket API Events??
MessageEvent is the interface commonly used by Web Sockets, Web Workers, and defined in Cross-document messaging
> http://www.w3.org/TR/2008/WD-html5-20080610/comms.html
[cid:effd8a.png@3e2cbe08.42b926dc]
Alexandre Morgaut
Wakanda Community Manager
Email : Alexandre.Morgaut@4d.com<mailto:Alexandre.Morgaut@4d.com>
Web : www.4D.com<http://www.4D.com>
4D SAS
60, rue d'Alsace
92110 Clichy - France
Standard : +33 1 40 87 92 00