- From: Nilsson, Claes1 <Claes1.Nilsson@sonymobile.com>
- Date: Thu, 11 Apr 2013 16:10:28 +0200
- To: 'Alexandre Morgaut' <Alexandre.Morgaut@4d.com>, "public-sysapps@w3.org" <public-sysapps@w3.org>
- CC: "Isberg, Anders" <Anders.Isberg@sonymobile.com>, "Edenbrandt, Anders" <Anders.Edenbrandt@sonymobile.com>, "Isaksson, Björn" <Bjorn.Isaksson@sonymobile.com>, "Falk, Mattias" <Mattias.Falk@sonymobile.com>
- Message-ID: <6DFA1B20D858A14488A66D6EEDF26AA3C5962681C7@seldmbx03.corpusers.net>
Hi Alexandre, Regarding usage of the MessageEvent interface: Yes, Web Sockets, Server-Sent events and uses the MessageEvent interface so it would be possible to use this interface for received UDP and TCP data as well. Two comments: 1. For definition of the MessageEvent interface you refer to a section of HTML 5 W3C Working Draft 10 June 2008 (http://www.w3.org/TR/2008/WD-html5-20080610/comms.html). However, the latest definition of MessageEvent seems to be http://www.w3.org/TR/webmessaging/#event-definitions. 2. It seems as the only attribute relevant for UDP and TCPSockets is “data”. The other attributes are aimed for use with server-sent events and cross document messaging. The Web Sockets specification also defines how the “origin” attribute should be set but I am not sure how this attribute should be set for use with UDP and TCP. Do we still want to reuse the MessageEvent interface for incoming data? I am considering your other comments. Thanks! Claes From: Alexandre Morgaut [mailto:Alexandre.Morgaut@4d.com] Sent: den 11 april 2013 12:48 To: Nilsson, Claes1; public-sysapps@w3.org Cc: Isberg, Anders; Edenbrandt, Anders; Isaksson, Björn; Falk, Mattias Subject: Re: [sysapps/raw socket api]: List of changes to be done based on Madrid session 2013-04-09 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:image001.png@01CE36C5.593E10A0] 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
Attachments
- image/png attachment: image001.png
Received on Thursday, 11 April 2013 14:10:59 UTC