Publish/subscribe over UDP

RCF support and general discussion.
Post Reply
okg
Posts: 10
Joined: Mon May 27, 2013 2:14 pm

Publish/subscribe over UDP

Post 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

jarl
Posts: 238
Joined: Mon Oct 03, 2011 4:53 am
Contact:

Re: Publish/subscribe over UDP

Post 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
Kind Regards

Jarl Lindrud
Delta V Software
http://www.deltavsoft.com

okg
Posts: 10
Joined: Mon May 27, 2013 2:14 pm

Re: Publish/subscribe over UDP

Post by okg »

Thank you Jarl,

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

Thanks for your time,
Konstantin

Post Reply