Archived

This forum has been archived. Please start a new discussion on GitHub.

UDP demo

in my job,wo try to send with UDP,i made the config like :

Server:
Callback.Server.Endpoints=tcp -p 10000:udp -p 10000

Client:
Callback.CallbackServer=callback:tcp -p 10000:udp -p 10000
Callback.Client.Endpoints=udp

now it's working but don't know whether work with UDP mode.
and in the demo,i fail to find the demo with it.Can you add some demo?

Comments

  • dwayne
    dwayne St. John's, Newfoundland
    Take a look at the hello demo (demo/Ice/hello) for an example of UDP usage. There is also a demo that demonstrates using UDP Multicast (demo/Ice/multicast).

    With regards to knowing whether you are using the UDP endpoint, if you using a datagram proxy then UDP will be used as it is the only Ice transport that supports datagrams. To create a datagram proxy you need to use the ice_datagram proxy method. For example in C++, something like:
    MyPrx prx = MyPrx::checkedCast(communicator->stringToProxy("<proxy string here>");
    MyPrx udpPrx = prx->ice_datagram();
    

    Making invocations with udpPrx will now use the UDP transport.