Re: [sysapps/raw socket api]: New version based on Madrid meeting comments and comments from Ke-Fong Lin

Yup, as written they are optional.

What we can and should do is to use prose to say that an exception is
thrown if either of them is left out when the constructor is called.

And you are right about the '?' syntax. That means that the argument is
nullable which is likely not what we want in the majority of cases here. So
I think it should be removed from most, if not all, dictionary members.

/ Jonas


On Tue, Apr 23, 2013 at 7:45 AM, Christophe Dumez - SISA <
ch.dumez@partner.samsung.com> wrote:

>  Hi,
>
> As far as I know, all dictionary members are optional. I think you may be
> confusing nullable and optional? It is true that they are currently not
> nullable, however, I do believe they are optional.
>
> Kr,
> Christophe DUMEZ.
>
>  ------------------------------
> *From:* Nilsson, Claes1 [Claes1.Nilsson@sonymobile.com]
> *Sent:* Tuesday, April 23, 2013 17:33
> *To:* Christophe Dumez - SISA; public-sysapps@w3.org
>
> *Cc:* Edenbrandt, Anders; "Ekberg, Björn"; Falk, Mattias; Isberg, Anders
> *Subject:* RE: [sysapps/raw socket api]: New version based on Madrid
> meeting comments and comments from Ke-Fong Lin
>
>   Hi Christophe,
>
>
>
> No, remoteAddress and remotePort are not optional. The options argument of
> type TCPOptions in the constructor is mandatory and the fields
> remoteAddress and remotePort fields are required.
>
>
>
> However, you are right that the WebIDL specification does not allowed as
> attribute types. I missed that.
>
>
>
> One option is just to extract the fields from the dictionaries and add
> them as separate attributes but maybe someone has a proposal for a better
> pattern?
>
>
>
> BR
>
>   Claes
>
>
>
>
>
> *From:* Christophe Dumez - SISA [mailto:ch.dumez@partner.samsung.com]
> *Sent:* den 23 april 2013 15:54
> *To:* Nilsson, Claes1; public-sysapps@w3.org
> *Cc:* Edenbrandt, Anders; Ekberg, Björn; Falk, Mattias; Isberg, Anders
> *Subject:* RE: [sysapps/raw socket api]: New version based on Madrid
> meeting comments and comments from Ke-Fong Lin
>
>
>
> Hi Claes,
>
> I thought we agreed during last F2F to pass the remoteAddress and
> remotePort as argument to the TCPSocket constructor, instead of having them
> in the TCPOptions dictionary?
>
> The issue with having remoteAddress and remotePort in the TCPOptions
> dictionary is that they are now optional. However, those need to be
> provided for the TCPSocket to work.
>
> Also note that having interface attributes of Dictionary types such as
> UDPSocket.options, TCPSocket.options and TCPServerSocket.options is not
> valid in Web IDL [1].
>
> Kr,
> Christophe DUMEZ.
>
> [1] http://dev.w3.org/2006/webapi/WebIDL/#idl-dictionaries
>     "Dictionaries MUST NOT be used as the type of an attribute<http://dev.w3.org/2006/webapi/WebIDL/#dfn-attribute>,
> constant <http://dev.w3.org/2006/webapi/WebIDL/#dfn-constant> or exception
> field <http://dev.w3.org/2006/webapi/WebIDL/#dfn-exception-field>. "
>  ------------------------------
>
> *From:* Nilsson, Claes1 [Claes1.Nilsson@sonymobile.com]
> *Sent:* Tuesday, April 23, 2013 16:35
> *To:* public-sysapps@w3.org
> *Cc:* Edenbrandt, Anders; "Ekberg, Björn"; Falk, Mattias; Isberg, Anders
> *Subject:* [sysapps/raw socket api]: New version based on Madrid meeting
> comments and comments from Ke-Fong Lin
>
> See http://raw-sockets.sysapps.org/
>
>
>
> Is this version now ready for a CFC for FPWD?
>
>
>
> Updates according to SysApps Madrid meeting 2013-04-09 and comments by
> Ke-Fong Lin (thanks a lot!):
>
>
>
> * For reading simplicity the API is restructured so that there are three
> main interfaces according to below:
>
> - interface UDPSocket : EventTarget
>
> - interface TCPSocket : EventTarget
>
> - interface TCPServerSocket : EventTarget
>
> * Syntax and semantics as much as possible aligned with W3C Web Sockets.
>
> * UDPSocket: Updated constructor to optionally use UDPOptions dictionary
> and extended the dictionary with fields for default remote address and port.
>
> * UDPSocket: Added joinMulticastGroup() and leaveMulticastGroup() methods
>
> * UDPSocket: Added an explicit method for closing a UDP socket
>
> * TCPSocket: Added method halfClose() and event for when peer has done hlf
> close.
>
> * UDP and TCPSockets: Aligned sending data with Web Sockets using 4
> overloading methods for different data types of outgoing data.
>
> * UDP and TCPSockets: Implementation dependent limit for when send()
> returns false indicating that send buffer is near getting full. If buffer
> full an error event is issued consistent with Web Sockets.
>
> * UDP and TCPSockets: Data type for received data is always ArrayBuffer.
> Atribute binaryType removed.
>
> * TCPServerSocket: Added methods suspend() and resume().
>
>
>
> Still to be done:
>
>
>
> * More work needed on support for secure sockets.
>
> * More UDP examples and potentially remove SSDP examples.
>
>
>
>
>
> *Claes Nilsson M.Sc.E.E** *
>
> Master Engineer - Web Research
>
> Advanced Application Labs
>
>
>
> Sony Mobile Communications
>
> Tel: +46 705 56 68 78
>
> sonymobile.com
>
>
>
> [image: Image removed by sender. SONY make.believe]
>
>
>

Received on Tuesday, 23 April 2013 17:53:44 UTC