Does ios cronet support websocket ?

506 views
Skip to first unread message

Gao Haidong

unread,
Mar 7, 2017, 3:34:26 AM3/7/17
to chromi...@chromium.org
Hi,

 I can see websocket is disabled in ios build.

  # WebSockets and socket stream code are not used on iOS and are optional in

  # cronet.

  enable_websockets = !is_ios


Can I manually open it ?

Thanks,

Haidong

Jason Liu

unread,
Mar 7, 2017, 9:45:04 AM3/7/17
to gaoha...@gmail.com, kapis...@chromium.org, Chromium-dev
+kapishnikov

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

Andrei

unread,
Mar 7, 2017, 11:09:46 AM3/7/17
to Chromium-dev, gaoha...@gmail.com, kapis...@chromium.org
WebSockets are disabled in Cronet by default and are not officially supported.

Gao Haidong

unread,
Mar 7, 2017, 9:13:47 PM3/7/17
to Andrei, Chromium-dev
Hi Andrei,

Thanks for the quick response!

I want to use the cronet to support both http(s) and ws(s) too. For ws use, I'd like to setup a in-app long connection that for instant push, etc.

For Cronet API, I have built a static lib with all necessary headers exported. So I can use the needed public exported classes.

Br,
Haidong

Adam Rice

unread,
Mar 7, 2017, 10:58:41 PM3/7/17
to gaoha...@gmail.com, Andrei, Chromium-dev
https://bugs.chromium.org/p/chromium/issues/detail?id=450518 "net::WebSocketEndpointLockManager should not be a singleton" negatively impacts the usefulness of exposing the WebSocket APIs from Cronet.

As a member of the Chrome WebSocket team, I don't want to support the net::WebSocketChannel and net::WebSocketEventInterface APIs as stable APIs because they have known deficiencies (eg. WebSocketEventInterface::ChannelState isn't needed any more since the switch to mojo), and we occasionally have to modify the APIs for new features (eg. DevTools are expected to to add network throttling to WebSockets this year).

Our team does not have time to spare to provide and support a stable Cronet WebSocket API wrapper, but if someone else had the resources to implement and provide long-term support for such a wrapper I would not object. The benefit of using this implementation over a third-party WebSocket client library would be the integration with the cookie store, proxy configuration, auth and SSL caches used by the rest of Cronet.
Reply all
Reply to author
Forward
0 new messages