RE : [sysapps/raw socket api]: New version to be reviewed at Madrid F2F-meeting

Hi,

First, let met introduce myself. I'm a colleague of Alexandre Morgaut. I'm the developer in charge of implementing the socket API on Wakanda, which is a NodeJS compatible. It includes "server" and SSL support.
I have quite a few suggestions that I've compiled in the attached sketch proposal. I'd rather think we can make the raw socket API more "compatible" with WebSocket. Basically, make all socket types, including WebSocket but except "server sockets", to derive from a main "Socket" parent. Logically, sockets are just receiving and sending.

Here are a few comments on the current proposal on http://raw-sockets.sysapps.org/ :

* Naming : onreceivetcp, onreceiveudp, sendUDP(), sendTCP() : Because we already know what kind of socket we use (UDP or TCP), just call them onreceive or send(). TCP or UDP suffixes are redundant I think.

* UDP multicast : Add join/leave multicast group. You won't receive multicast packets unless you join the group. Also some routers won't relay packets if the sender hasn't joined the group (even if it is legal to send to any address using an UDP socket).

* Send buffering issues : Send buffers are both system and socket implementation dependent. For instance, on Linux, it is easy to set the system's buffer size, can notably be made bigger (typical on video streamers). Also the socket implementation does buffering (bufferedAmount). There is the "ondrain" event when bufferedAmount is back to zero. Note that NodeJS, even has the option to set a callback to the socket.write() function, which is called when the send() effectively send the buffered the data. Having a boolean hint is a good idea. Need to be more precise, need to have a way to know where is the "threshold" for hint to be true. Or we can act as NodeJS and return true when buffered in system memory and false if all or partially buffered in user memory.

It is a little bit difficult to discuss specifications through emails, I'll be there (along with Alexandre) at Madrid.

Best regards,


/* Lin Ke-Fong
 * Senior Developer
 * ke-fong.lin@4d.com
 * +33 1 40 87 92 56
 */




Ke-Fong Lin
Développeur Senior

4D SAS
60, rue d'Alsace
92110 Clichy
France

Standard :
Email :    Ke-Fong.Lin@4d.com
Web :      www.4D.com


________________________________________
De : Nilsson, Claes1 [Claes1.Nilsson@sonymobile.com]
Date d'envoi : jeudi 4 avril 2013 15:36
À : public-sysapps@w3.org
Objet : [sysapps/raw socket api]: New version to be reviewed at Madrid  F2F-meeting

http://raw-sockets.sysapps.org/


Updates done are:

* Clarifications for UDP multicast
* Error handling detailed at several places
* For TCPServerSocket added closeServer() method and removed maxConnections
* Misc clarifications at several places

I am happy for all comments, also prior to the F2F.

See you in Madrid!

Claes

Claes Nilsson M.Sc.E.E
Master Engineer - Web Research
Advanced Application Labs

Sony Mobile Communications
Tel: +46 705 56 68 78
sonymobile.com<http://sonymobile.com/>

[cid:image001.jpg@01CE3149.B6C10600]

Received on Friday, 5 April 2013 13:12:09 UTC