enable QUIC only for Cronet in iOS

241 views
Skip to first unread message

Han Xu

unread,
Jan 22, 2020, 1:35:51 PM1/22/20
to QUIC Prototype Protocol Discussion group
Hi,

I am using Cronet in iOS and trying to enable QUIC only (i.e. not TCP based HTTP) for Cronet stack.  Right now, I am calling this API: 

    [Cronet addQuicHint:@"127.0.0.1" port:3456 altPort:3456];  // needed to force Cronet to use QUIC (UDP)


But this API can only be called before [Cronet start], which means I have to know all the Quic hints before-hand.


Is there a way to force Cronet always use QUIC in iOS?


Thanks

Han



Han Xu

unread,
Jan 23, 2020, 2:56:57 PM1/23/20
to QUIC Prototype Protocol Discussion group
Just to share that I hacked the source code a bit and added a method to allow setting QUIC hint after "cronet" started on iOS.  Here is the gist: https://gist.github.com/keepsimple1/525d69569f0058e4c19f260f473a4b97 .   Any comment or advice for the gist or the original question are appreciated!

Sumin Duan

unread,
Dec 4, 2020, 5:18:29 AM12/4/20
to QUIC Prototype Protocol Discussion group, keeps...@gmail.com
Hi, do you fix this problem?
I also want to force Cronet to only use QUIC in cronet native.
How should I do?

Cronet version: 89.0.4331.0

Han

unread,
Dec 4, 2020, 12:16:49 PM12/4/20
to Sumin Duan, QUIC Prototype Protocol Discussion group
Hi,

The gist I shared earlier worked for me (using Chromium 87). When using it, just call "setQuicHint()" right before executing the Http request. By the way, with the recent Cronet, you don't need to fix the crypto version as in the gist.

Han

Su

unread,
Dec 7, 2020, 4:16:42 AM12/7/20
to QUIC Prototype Protocol Discussion group, keeps...@gmail.com, QUIC Prototype Protocol Discussion group, Su
I set the quic-hint, but the demo still created TCP connection at first. I expect that creating TCP connection is forbidden.
Reply all
Reply to author
Forward
0 new messages