// Collection of code snippets by Arne Vajhøj // (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) using System; using NetMQ; using NetMQ.Sockets; public class Cli { private static void Test(string addr) { using (RequestSocket s = new RequestSocket()) { s.Connect(addr); string reqmsg = "C# Client"; s.SendFrame(reqmsg); string respmsg = s.ReceiveFrameString(); Console.WriteLine(respmsg); } } public static void Main(string[] args) { Test("tcp://localhost:10001"); Test("tcp://localhost:10002"); Test("tcp://localhost:10003"); Test("tcp://localhost:10004"); Test("tcp://localhost:10005"); Test("tcp://localhost:10006"); } }