libzmtp icon indicating copy to clipboard operation
libzmtp copied to clipboard

XSUB "support"

Open mhaberler opened this issue 9 years ago • 3 comments

we have some interest in an embedded client which would need to do both DEALER and XSUB (NB @zhivko)

it turns out the dealer socket works just fine with an XSUB publisher, see testxsub.c in https://github.com/mhaberler/libzmtp/commits/xpub

happy to take recommendations what to do with this

I see how I could do a ROUTER pthread for a dealer selftest I do not see how I could do a XPUB pthread - unclear how to manage subscriptions

is it worth writing zmtp_router.c, zmtp_xsub.c classes?

mhaberler avatar Jun 30 '16 12:06 mhaberler

Hi Michael, I think it makes perfect sense to add support for XSUB socket type. is it your idea to contribute patches for this?

hurtonm avatar Jun 30 '16 12:06 hurtonm

fine - it's just that it will be a rather boring copy & paste job on zmtp_dealer.c with renamed methods - plus subscribe/unsubscribe methods

if that is OK I'll do it and give it a stab at selftests

mhaberler avatar Jun 30 '16 13:06 mhaberler

yes, but often that creates an opportunity to refactor existing code base and that usually is rewarding experience

hurtonm avatar Jun 30 '16 13:06 hurtonm