Re: [W3C Sys Apps]: New version of Raw Socket API proposal

Some quick comments:

* Since you switch to constructor usage (great!) why not have two types:
TcpSocket and UdpSocket, so that the methods that only apply to one type
are not defined?  Also, the constructor RawSocket('tcp') seems less nice
than just TcpSocket().
* close() replacing disconnect/destroy: The state of the RawSocket after
construction but before connect is different than the state after a close()
call.  Also, it is not clear if close() should be called with udp sockets
that don't issue a connect().  I think that combining the concept of
disconnect/destroy should be well thought out first.
* recvFrom: if you do not support buffer size, the developer will have to
do their own buffer management.  The callback does not need to be called
with each datagram received, the payload may be buffered or sliced up.

-Michal Mocny


On Mon, Jan 28, 2013 at 3:22 AM, Nilsson, Claes1 <
Claes1.Nilsson@sonymobile.com> wrote:

> Hi,****
>
> ** **
>
> I have uploaded a new version of the Raw Socket API proposal:
> http://sysapps.github.com/sysapps/proposals/raw-socket/Socket.HTML****
>
> ** **
>
> The major changes are:****
>
> ** **
>
> • Removed  create() and instead defined a constructor for the
> RawSocket-object.****
>
> • Removed  disconnect() and destroy() and defined a method close().****
>
> • Added support for server with Listen() och Accept().****
>
> • In ”Dictionary CreateOptions” added an attribute “useSecureTransport”
> for ssl/tls and changed ” addressReuse” to default False.****
>
> • Definied error handling with DOMError. Callback-functions has a nullable
> attribut ”error” of type DOMError. If success then error === null else if
> error a DOMError-sträng. Error codes still need to be defined.****
>
> ** **
>
> Comments are welcome.****
>
> ** **
>
> Best regards****
>
>   Claes****
>
> ** **
>
> ** **
>
> ** **
>
> [image: cid:3333625383_1036728]
>
> *Claes Nilsson M.Sc.E.E*
> Master Engineer, Research
> Technology Research - Advanced Application Lab
> *
> Sony Mobile Communications*
>  Phone:  +46 10 80 15178
> Mobile: +46 705 56 68 78
> Switchboard: +46 10 80 00000
> E-Mail:* **mailto:claes1.nilsson@sonymobile.com<claes1.nilsson@sonyericsson.com>
> *
> Visiting Address; Nya Vattentornet
> SE-221 88 LUND,
> Sweden ****
>
> *Disclaimer:
> *The information in this e-mail is confidential and may be legally
> privileged. It is intended solely for the named recipient(s) and access to
> this e-mail by anyone else is unauthorized. The views are those of the
> sender and not necessarily the views of Sony Ericsson and Sony Ericsson
> accepts no responsibility or liability whatsoever or howsoever arising in
> connection with this e-mail.Any attachment(s) to this message has been
> checked for viruses, but please rely on your own virus checker and
> procedures. If you contact us by e-mail, we will store your name and
> address to facilitate communications. If you are not the intended
> recipient, please inform the sender by replying this transmission and
> delete the e-mail and any copies of it without disclosing it.****
>
> ** **
>

Received on Tuesday, 29 January 2013 17:59:20 UTC