On Tue, Jun 5, 2012 at 7:18 PM, Mike Tsao <mi
...@chromium.org> wrote:
> See
>
http://code.google.com/searchframe#OAMlx_jo-ck/src/chrome/common/exte...
> .
> The IDL marks these APIs with the "nodoc" attribute because they're
> very early in the experimental development process, and it would be
> misleading to potential developers to begin documenting them on the
> website.
> Ryan, you are correct that "someone [on the Chromium team] forgot to
> do a few things." Specifically, the document generator was briefly
> failing to completely respect the nodoc attribute, causing a very
> outdated version of the page you've cited to be rolled out to the
> website as an orphan. That page should not exist. The IDL, however,
> will remain authoritative.
> On Mon, Jun 4, 2012 at 3:32 PM, ryan <ryanack...@gmail.com> wrote:
> > Yeah, someone at Google forgot to do a few things. This API isn't
> > listed under
> http://code.google.com/chrome/extensions/experimental.html#overview
> > but googling for it shows this page:
> > http://code.google.com/chrome/extensions/experimental.socket.html
> > I would have never known about it unless I accidentally saw this
> > post.
> > On May 30, 11:08 am, ningxin hu <ningxin...@intel.com> wrote:
> >> Currently chrome.experimental.socket API doesn't support TCP
> >> listening/
> >> server socket. With TCP listening/server socket, extensions could
> >> expose services such as for remote control, system integration etc.,
> >> So I propose to add TCP listening/server socket support with some new
> >> APIs:
> >> [nodoc] namespace experimental.socket {
> >> ...
> >> dictionary AcceptInfo {
> >> // The id of the newly connected socket.
> >> long socketId;
> >> // Peer address of the connection.
> >> DOMString address;
> >> long port;
> >> };
> >> callback AcceptCallback = void (AcceptInfo acceptInfo);
> >> ...
> >> interface Functions {
> >> ...
> >> // Listens for connections on a TCP socket. The socket should be
> >> // bound to a local endpoint before listening.
> >> // |socketId| : The socketId.
> >> // |backlog| : The maximum length of the queue of the pending
> >> // connections. The default value is 5.
> >> static void listen(long socketId,
> >> optional long backlog);
> >> // Accepts a connection on a listening socket.
> >> // |socketId| : The socketId of the listening socket.
> >> // |callback| : called when accept attempt is completed.
> >> static void accept(long socketId,
> >> AcceptCallback callback);
> >> };
> >> };
> >> An example of APIs usage is:
> //-------------------------------------------------------------------------
> ----------------------------------------
> >> var listening_socket_id = -1;
> >> var server_socket_id = -1;
> >> function dataReceived(info) {
> >> if (info.resultCode > 0) {
> >> chrome.experimental.socket.write(server_socket_id,
> >> info.data,
> >> function (info)
> >> { });
> >> }
> >> };
> >> function connectionAccepted(info) {
> >> if (info.socketId > 0) {
> >> server_socket_id = info.socketId;
> >> chrome.experimental.socket.read(server_socket_id, dataReceived);
> >> }
> >> };
> >> function socketBound(result) {
> >> if (result == 0) {
> >> chrome.experimental.socket.listen(listening_socket_id);
> >> chrome.experimental.socket.accept(listening_socket_id,
> >> connectionAccepted);
> >> }
> >> };
> >> function socketCreated(info) {
> >> listening_socket_id = info.socketId;
> >> chrome.experimental.socket.bind(listening_socket_id, "127.0.0.1",
> >> 8800, socketBound);
> >> };
> >> chrome.experimental.socket.create("tcp", socketCreated);
> //-------------------------------------------------------------------------
> ---------------------------------------------
> >> Thoughts? Concerns? If folks like this proposal, I will upload a CL
> >> for review.
> >> BTW, I cannot find the existing socket proposal
> >> page underhttp://
> dev.chromium.org/developers/design-documents/extensions/.
> >> Is it hosted in another place?
> >> Thanks,
> >> -ningxin
> > --
> > You received this message because you are subscribed to the Google
> Groups "Chromium-extensions" group.
> > To post to this group, send email to chromium-extensi...@chromium.org.
> > To unsubscribe from this group, send email to
> chromium-extensions+unsubscr...@chromium.org.
> > For more options, visit this group at
> http://groups.google.com/a/chromium.org/group/chromium-extensions/?hl=en.
> --
> You received this message because you are subscribed to the Google Groups
> "Chromium-extensions" group.
> To post to this group, send email to chromium-extensi...@chromium.org.
> To unsubscribe from this group, send email to
> chromium-extensions+unsubscr...@chromium.org.
> For more options, visit this group at
> http://groups.google.com/a/chromium.org/group/chromium-extensions/?hl=en.