Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OkHTTP WebSocket Support #39

Open
AhmMhd opened this issue Jul 16, 2024 · 1 comment
Open

OkHTTP WebSocket Support #39

AhmMhd opened this issue Jul 16, 2024 · 1 comment

Comments

@AhmMhd
Copy link

AhmMhd commented Jul 16, 2024

I am trying to open a websocket connection using okhttp + cronet. It's failing every time with following exception:

java.io.IOException: java.util.concurrent.ExecutionException: m.mc: Exception in CronetUrlRequest: net::ERR_INVALID_HTTP_RESPONSE, ErrorCode=11, InternalErrorCode=-370, Retryable=false

my okhttp clinet:
val webSocket = OkHttpClient.Builder() .addInterceptor(CronetInterceptor.newBuilder(cronetEngine).build())

My connection works if i remove CronetInterceptor. Can anyone confirm is cronet supports websocket connections?

@edechamps-Google
Copy link
Collaborator

Hi,

I'm afraid Cronet does not support WebSocket. Therefore the OkHttp Cronet transport doesn't support it either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants