title: How to Push data from C# to ZeroMQ and Pull from Node.JS or vice-versa?
body: <p><strong>Scenario</strong>:</p>
  
  <p>I am trying to send a data (say <code>String</code> type)  from C# сonsole application to Node.JS server through ZeroMQ.</p>
  
  <p><strong>Information:</strong></p>
  
  <p>Using clrzmq for c# and ZeroMQ libs for C# and Node.JS respectively</p>
  
  <p>I am able to perform <a href="https://github.com/JustinTulloss/zeromq.node/blob/master/examples/push_pull.js" rel="nofollow">push-pull</a> from Node.JS, also <a href="https://github.com/zeromq/clrzmq#example-client" rel="nofollow">push</a> - <a href="https://github.com/zeromq/clrzmq#example-server" rel="nofollow">pull</a> from C#.</p>
  
  <p>So, one thing is confirmed that <a href="http://www.zeromq.org/" rel="nofollow">ZeroMQ - The Intelligent Transport Layer</a> is installed on the machine (Windows 7 64-bit)</p>
  
  <p><strong>Issue</strong>:</p>
  
  <p>I am not able to push data from C# Console app to Node.JS app (even tried vice-versa), both are on the same machine and on the same address i.e <code>tcp://127.0.0.1:2222</code></p>
  
  <p>Node.js code:</p>
  
  <pre><code>var zmq = require('zeromq.node');
  var pull_socket = zmq.socket('pull');    
  pull_socket.connect('tcp://127.0.0.1:2222');    
  pull_socket.on('message', function (data) {
      console.log('received data:\n');
      console.log(data);
  });
  </code></pre>
  
  <p>C# code:</p>
  
  <pre><code>namespace DataServiceEngine
  {
      class Program
      {
          static void Main(string[] args)
          {
              //clsApp App = new clsApp();
              //App.appId = "001";
              //App.name = "Back Office";
  
              //Console.WriteLine("appId :" + App.appId + "\n");
              //Console.WriteLine("name:" + App.name + "\n");
  
              try
              {
                  // ZMQ Context and client socket
                  using (var context = new Context(1))
                  {
                      using (Socket client = context.Socket(SocketType.PUSH))
                      {
                          client.Connect("tcp://127.0.0.1:2222");
  
                          string request = "Hello";
                          for (int requestNum = 0; requestNum &lt; 10; requestNum++)
                          {
                              Console.WriteLine("Sending request {0}...", requestNum);
                              client.Send(request, Encoding.Unicode);
  
                              string reply = client.Recv(Encoding.Unicode);
                              Console.WriteLine("Received reply {0}: {1}", requestNum, reply);
                          }
                      }
                  }
              }
              catch (ZMQ.Exception exp)
              {
                  Console.WriteLine(exp.Message);
              }
          }
      }
  }
  </code></pre>
  
  <p><strong>Question</strong>: Can anyone tell me what may be the reason or where am I doing wrong?</p>