[zeromq-dev] The type or namespace name 'ZMQ' could not be found
Pierre Rougier
pierougier at yahoo.fr
Fri Mar 25 20:54:11 CET 2011
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.compton at 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);
}
}
}
}
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110325/52b4b532/attachment.htm>
More information about the zeromq-dev
mailing list