zeroc-ice / ice

All-in-one solution for creating networked applications with RPC, pub/sub, server deployment, and more.
https://zeroc.com
GNU General Public License v2.0
2.04k stars 592 forks source link

Remove UDP related code from JavaScript #2246

Closed pepone closed 4 months ago

pepone commented 4 months ago

This PR removes UDP-related code from JavaScript. Since we do not have a UDP transport and there are no plans to add one, there is no reason to keep this code.

bernardnormier commented 4 months ago

Can you still unmarshal / marshal / parse a proxy with a UDP endpoint, without using opaque?

I think it's desirable to keep this support.

pepone commented 4 months ago

As of Ice 3.7, can js parse a proxy with a udp endpoint?

No, we ignore UDP endpoints when parsing.

"hello:udp -h localhost -p 10000:tcp -h localhost -p 10000"

Parsing this result in a proxy with a single TCP endpoint, in both 3.7 and this PR

bernardnormier commented 4 months ago

Parsing this result in a proxy with a single TCP endpoint, in both 3.7 and this PR

Ok, I wrote a little test for C++ and JS. And indeed, in both we ignore unknown endpoints when parsing an endpoint string and log a warning. For example:

*** [1/2] Running js/Ice/proxy tests ***
[ running client/server test - 05/31/24 13:59:27 ]
testing stringToProxy... -! 5/31/2024, 13:59:27.746 warning: Proxy contains unknown endpoints: `foo -h localhost' `udp -h localhost -p 1234'
ok