SV: [sysapps/raw socket api]: List of changes to be done based on Madrid session 2013-04-09

Ok Bryan. I have this as the working assumption for now.

Best regards
  Claes

Sent from my Sony Xperia™-smartphone

"SULLIVAN, BRYAN L" <bs3131@att.com> skrev:


As the message event interface underlies so many of the eventing features of the web platform, I recommend to use/extend it as needed, like the other specs have done. I think it’s helpful to developers to follow this common interface pattern.

Thanks,
Bryan Sullivan

From: Nilsson, Claes1 [mailto:Claes1.Nilsson@sonymobile.com]
Sent: Thursday, April 11, 2013 7:10 AM
To: 'Alexandre Morgaut'; 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

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<mailto: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@01CE3688.2561ED70]

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

Received on Friday, 12 April 2013 07:10:43 UTC