Hello,

I try to Build the  Hello World server.
Get the following error :

Error1The type or namespace name 'ZMQ' could not be found (are you missing a 
using directive or an assembly 
reference?)E:\ZeroMQ\LeGuide\ZeroMQLeGuide\HelloWorldServer\hwserver.cs137HelloWorldServer


Thanks,

Pierre Rougier





//
//  Hello World server
//  Binds REP socket to tcp://*:5555
//  Expects "Hello" from client, replies with "World"
//

//  Author:     Michael Compton
//  Email:      michael.comp...@littleedge.co.uk

using System;
using System.Text;
using System.Threading;
using ZMQ;

namespace ZMQGuide {
    class Program {
        static void Main(string[] args) {
            // ZMQ Context
            using (Context context = new Context(1)) {
                // Socket to talk to clients
                using (Socket socket = context.Socket(SocketType.REP)) {
                    socket.Bind("tcp://*:5555");
                    
                    while (true) {
                        // Wait for next request from client
                        string message = socket.Recv(Encoding.Unicode);
                        Console.WriteLine("Received request: {0}", message);

                        // Do Some 'work'
                        Thread.Sleep(1000);

                        // Send reply back to client
                        socket.Send("World", Encoding.Unicode);
                    }
                }
            }
        }
    }
}



      
_______________________________________________
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to