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

UDP client/transport for GRPC #1049

Closed
tiwariashish86 opened this issue Sep 11, 2020 · 8 comments
Closed

UDP client/transport for GRPC #1049

tiwariashish86 opened this issue Sep 11, 2020 · 8 comments
Labels
question Further information is requested

Comments

@tiwariashish86
Copy link

Is it possible to use UDP client/transport underneath GRPC? It would be really good for gaming applications.

@tiwariashish86 tiwariashish86 added the question Further information is requested label Sep 11, 2020
@JamesNK
Copy link
Member

JamesNK commented Sep 14, 2020

It will probably be possible with HTTP/3. HTTP/3 is very new and not well supported yet by clients or servers so I haven't tried it yet.

@tiwariashish86
Copy link
Author

As per https://grpc.github.io/grpc/core/md_doc_core_transport_explainer.html, it seems you can either use Cronet transport or implement your own transport. Is that true for GRPC C# as well? Basically i am trying to develop a gaming application with GRPC C# on unity. So I am trying to find out if I can use a UDP client underneath and how much effort that would require to implement?

@JamesNK
Copy link
Member

JamesNK commented Sep 18, 2020

Yes https://docs.microsoft.com/en-us/aspnet/core/grpc/interprocess?view=aspnetcore-5.0

However SocketsHttpHandler.ConnectCallback is probably not supported on Unity.

@tiwariashish86
Copy link
Author

Yeah You are right. One more thing so GRPC must be using some HTTPClient underneath. Is it possible to expose that for some other purposes like normal rest calls to CDN?

@chwarr
Copy link

chwarr commented Sep 19, 2020

You are looking for .NET's HttpClient. gRPC for .NET uses this underneath. (It also uses some lower level abstractions too. For more details, you'll want to read the code in this repo.)

@tiwariashish86
Copy link
Author

I am looking at their code but I dont see reference for HTTPClient in the code. Since my use case is related to unity for gaming, I am using unity version of GRPC lib https://packages.grpc.io/archive/2019/11/6950e15882f28e43685e948a7e5227bfcef398cd-6d642d6c-a6fc-4897-a612-62b0a3c9026b/csharp/grpc_unity_package.2.26.0-dev.zip. I want expose this HTTPClient for other purpose like CDN requests as well to avoid multiple HttpClient maintenance.

@JamesNK
Copy link
Member

JamesNK commented Sep 22, 2020

That is Grpc.Core. It is a different gRPC implementation and uses its own HTTP/2 library. Ask questions about it at https://github.com/grpc/grpc. It isn't a general purpose HTTP client.

@JamesNK
Copy link
Member

JamesNK commented Sep 28, 2020

Closing as answered.

@JamesNK JamesNK closed this as completed Sep 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants