Page 1 of 1

Publish/subscribe over UDP

Posted: Fri Apr 17, 2015 12:51 pm
by okg
Hi,

I’m trying to subscribe to RCF::RcfServer( RCF::UdpEndpoint() )
and the client fails in createSubscription with ‘Exception type: class std::bad_cast. Exception message: "Bad dynamic_cast!".’
Using RCF::enableLogging(RCF::LogToDebugWindow(), 2) I’ve found the problem starts in UdpServerTransport::cycle as ‘Socket error. Call to OS function select() failed. OS: 10038 - An operation was attempted on something that is not a socket’.
The main client-to-server calls work fine though.

I just got the original TCP based Publish/subscribe sample from the manual and changed all the enpoints to UDP.

Could you please tell me whether the Publish/subscribe functionality is supported over UDP.
Are there any related tricks?
Unfortunately I might miss something important at this point.

Thank you in advance,
Konstantin

Re: Publish/subscribe over UDP

Posted: Fri Apr 17, 2015 1:46 pm
by jarl
Hi Konstantin,

The publish/subscribe implementation in RCF does not support UDP. What you can do with UDP, though, is to make use of multicast and broadcast addresses to setup a much simpler publish and subscribe system, as described here:

http://www.deltavsoft.com/doc/rcf_user_ ... ations.Udp

Re: Publish/subscribe over UDP

Posted: Fri Apr 17, 2015 4:16 pm
by okg
Thank you Jarl,

The idea is brilliant! I will go that way most probably.

Thanks for your time,
Konstantin