3

I have an application composed from a server and a client.

The Server is C/C++ application, and the client is a cross-platform Xamarin application that target Windows, Android and iOS .

The Server part and the Client part communicate using ZeroMQ messages.

I tried the current c# implementation like NetMQ and clrzmq, but they cannot be used in Xamarin.

Did you know the simplest way to use ZeroMQ in Xamarin?

leppie
  • 115,091
  • 17
  • 196
  • 297
ProEns08
  • 1,856
  • 2
  • 22
  • 38
  • 1
    I fear there is no straightforward solution atm. Not until the NetMQ author will take all the way down to making the library portable. If you need a quick solution you can try to make an HTTP tunnel for your data i.e. transfer your data from Xamarin client to IIS server via HTTP and there unpack NetMQ packages from HTTP packets and resend those to your C/C++ ZeroMQ server. – Zverev Evgeniy May 12 '16 at 14:13
  • From your experience in Xamarin. did you know any other messaging framework usable in Xamarin for all targets (windows, iOS and Android). I should use a messaging framework and not an ordianry TCP socket because I need the ultimate performance. – ProEns08 May 12 '16 at 14:18
  • 1
    Try this: https://components.xamarin.com/view/socketioclientdotnet or this: https://www.nuget.org/packages/rda.SocketsForPCL though I do not quite get what you mean saying "not an ordinary TCP socket". If you mean you need UDP for lower latency than I get that but do you mean that? – Zverev Evgeniy May 12 '16 at 14:22
  • Very useful links. What do you think about their performance. Could they be compared to ZeroMQ? – ProEns08 May 12 '16 at 14:26

1 Answers1

2

I fear there is no straightforward solution atm. Not until the NetMQ author will take all the way down to making the library portable. If you need a quick workaround you could try to make an HTTP tunnel for your data i.e. transfer your data from Xamarin client to IIS server via HTTP and there unpack NetMQ packages from HTTP packets and resend those to your C/C++ ZeroMQ server.

As an alternative you could try this: Socket.IO Client .NET or this: Sockets Plugin for Xamarin.

I do not have any comparison of their performance to ZeroMQ and NetMQ in particular though.

Zverev Evgeniy
  • 3,643
  • 25
  • 42
  • I'm NetMQ author, I think making NetMQ portable is probably impossible, I think we can try and make portable, client only, thin library which support ZMTP (the zeromq/netmq transport protocol). I have started something, but it needs more work and I'm looking for someone that needs it and want to invest in it. https://github.com/somdoron/zmtp.net – somdoron May 14 '16 at 11:03
  • @somdoron is there an update on ZMTP , i was trying to use NetMq on Xamarin for connection between UWP and Android. – Morse Jan 18 '19 at 22:03