I've added precompiled binaries for NetMQ and some examples in each language. The version that is currently up works fine on Windows, the MAC version has some bugs as soon as the update is published that should be fixed though with the latest build from the master branch. Available here: https://www.assetstore.unity3d.com/en/#!/content/29213 If you want to compile the DLLs yourself you can get the source from: https://github.com/zeromq/netmq Open the NetMQ3.5.csproj and build. Terminating the context hangs Unity, let Unity clean up the context. Also, closing sockets causes high CPU usage if playing and stopping the editor. Disconnecting/Unbinding and letting Unity take care of the rest will save some CPU. Other than the cleanup issues everything else appears to be working fine for me. The update process for packages is kind of clunky so ignore the mistakes in the examples I will get them updated, I just noticed the CPU issue and figured out why it was happening. I'll be posting advanced examples soon, in all the languages and in some time a full game server built using NetMQ.
Hi Bschumacher, I have installed this on two computers now and even the basic scene (the C# one, but I also tried JS) simply hangs my unity version. I am activating the scene, then use the unity player. I do not get any messages, unity simply hangs. A standalone build does the same, it goes into "not responding" before even writing (flushing?) to the output_log.txt. If I comment out the sending and receiving parts (ie only opening and closing sockets), it runs fine and spits out all log messages. UPDATE: Using lots of log messages, I have found that the first receive ("m1=server.ReceiveString()") will never receive a message. I added a timeout, but this leads to a statemachine error in zmq because we then send a reply before a request (as the request never got there). Any insights?/ Thanks, Dirk
Same experience as double dork - perhaps there's a compatibility issue with Unity 5? I tried compiling the dll from latest code but same results.
Ah didn't see your message there double dork. I thought I tried it on Unity 5. What operating systems are you running? I'll check again a bit later. Using the Web Player it will not work I know for sure, the standalone builds should work though. Try using the Boo example, just out of curiosity.
It works in Unity 5 on OS X. Unity 5 on Windows support is definitely broken. I tried the latest sources as well. It worked fine on 4.6 using Windows. If there was some kind of output I would see if I could fix it, unfortunately it locks up completely. Sorry about that.
Might he helpful: https://github.com/zeromq/netmq/issues/324 AsyncIO.ForceDotNet.Force(); + Unity 5.1 + netmq compiled from source (https://github.com/zeromq/netmq/commit/a89513b76e6b2d4d2459d698dfac95e6ec3fd685) And things seem to kind of work. At least I got the C# sample working. However I can't get pub/sub to work, at least between a remote server and local Unity client. Though that might be a network issue...will see if a local publisher works.
I'll take a look when I get home and verify if that fixes it or not. I do have a much more advanced example with pub/sub and a protocol implementation that I was working on.
It seems the issue was in using a domain name rather than an ip address in the client connect call. Using an IP address and I can get a basic pub/sub setup working
Sorry to drag up this old thread. I've been trying to use netMQ recently, and I can't seem to get the dll into unity without getting this error: Unhandled Exception: System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded. This is using a dll I compiled from the NetMQ3.5.csproj you gave a link to. Did anybody have this issue?
Sorry for bringing a dead topic from the dead. That message is misleading. Did you copy the Async.IO dll into your Assets folder? That solved the issue for me.