Skip to content

Commit 6a2d73a

Browse files
author
John Gozde
committed
Update readme for 3.0.
1 parent 45633e1 commit 6a2d73a

File tree

1 file changed

+27
-25
lines changed

1 file changed

+27
-25
lines changed

README.md

+27-25
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33

44
This project aims to provide the full functionality of the underlying ZeroMQ API to CLR projects.
55

6-
The version of libzmq currently being targeted is **2.1 (stable)**.
6+
Bundled libzmq version: **3.1 (unstable)**
7+
Legacy libzmq version supported: **2.1.11 (stable)**
78

89
## Getting Started
910

10-
The quickest way to get started with clrzmq is by using the [NuGet package][clrzmq-nuget-x86] ([64-bit version][clrzmq-nuget-x64]). The NuGet packages include a copy of the native libzmq.dll, which is required to use clrzmq.
11+
The quickest way to get started with clrzmq is by using the [NuGet package][clrzmq-nuget]. The NuGet packages include a copy of the native libzmq.dll, which is required to use clrzmq.
1112

1213
You may also build clrzmq directly from the source. See the Development Environment Setup instructions below for more detail.
1314

@@ -28,22 +29,22 @@ namespace ZMQGuide
2829
static void Main(string[] args)
2930
{
3031
// ZMQ Context, server socket
31-
using (Context context = new Context(1)
32-
using (Socket socket = context.Socket(SocketType.REP))
32+
using (ZmqContext context = ZmqContext.Create())
33+
using (ZmqSocket server = context.CreateSocket(SocketType.REP))
3334
{
3435
socket.Bind("tcp://*:5555");
3536

3637
while (true)
3738
{
3839
// Wait for next request from client
39-
string message = socket.Recv(Encoding.Unicode);
40+
string message = server.Receive(Encoding.Unicode);
4041
Console.WriteLine("Received request: {0}", message);
4142

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

4546
// Send reply back to client
46-
socket.Send("World", Encoding.Unicode);
47+
server.Send("World", Encoding.Unicode);
4748
}
4849
}
4950
}
@@ -65,18 +66,18 @@ namespace ZMQGuide
6566
static void Main(string[] args)
6667
{
6768
// ZMQ Context and client socket
68-
using (Context context = new Context(1))
69-
using (Socket requester = context.Socket(SocketType.REQ))
69+
using (ZmqContext context = ZmqContext.Create())
70+
using (ZmqSocket client = context.CreateSocket(SocketType.REQ))
7071
{
71-
requester.Connect("tcp://localhost:5555");
72+
client.Connect("tcp://localhost:5555");
7273

7374
string request = "Hello";
7475
for (int requestNum = 0; requestNum < 10; requestNum++)
7576
{
7677
Console.WriteLine("Sending request {0}...", requestNum);
77-
requester.Send(request, Encoding.Unicode);
78+
client.Send(request, Encoding.Unicode);
7879

79-
string reply = requester.Recv(Encoding.Unicode);
80+
string reply = client.Receive(Encoding.Unicode);
8081
Console.WriteLine("Received reply {0}: {1}", requestNum, reply);
8182
}
8283
}
@@ -93,24 +94,23 @@ On Windows/.NET, clrzmq is developed with Visual Studio 2010. Mono development i
9394

9495
### Windows/.NET
9596

96-
Before clrzmq can be used, the native `libzmq.dll` must be compiled for your target platform from [0MQ sources][libzmq-2].
97+
Before clrzmq can be used, the native `libzmq.dll` must be compiled for your target platform from [0MQ sources][libzmq].
9798

9899
#### libzmq
99100

100-
1. Download/clone the source from the [repository][libzmq-2] or the [ZeroMQ website][zmq-dl].
101+
1. Download/clone the source from the [repository][libzmq] or the [ZeroMQ website][zmq-dl].
101102
2. Open the Visual Studio solution, located in `builds/msvc/msvc.sln`.
102-
3. Set the build configuration as necessary (e.g., Release/Win32 or WithOpenPGM/x64).
103+
3. Set the build configuration as necessary (e.g., Release/Win32, WithOpenPGM/x64, etc.).
103104
* **NOTE:** WithOpenPGM builds require the bundled OpenPGM sources to be built for Windows, the steps of which are beyond the scope of this README.
104105
4. Build the `libzmq` project.
105-
5. `libzmq.dll` should now be located at `/lib` in the zeromq source tree.
106+
5. `libzmq.dll` should now be located at `/bin` in the zeromq source tree.
106107

107108
#### clrzmq
108109

109110
1. Clone the source.
110-
2. Run `nuget.cmd`, which downloads any dependent packages (e.g., Machine.Specifications for acceptance tests).
111-
3. Copy `libzmq.dll` from the zeromq project to the appropriate location in the clrzmq lib folder (i.e., `/lib/x86` or `/lib/x64`).
112-
4. Run `build.cmd` to build the project and run the test suite. PGM-related tests will fail if a non-PGM build of libzmq is used.
113-
5. The resulting binaries will be available in `/build`.
111+
2. Copy `libzmq.dll` from the zeromq project to the appropriate location in the clrzmq lib folder (i.e., `/lib/x86` or `/lib/x64`).
112+
3. Run `build.cmd` to build the project and run the test suite. PGM-related tests will fail if a non-PGM build of libzmq is used.
113+
4. The resulting binaries will be available in `/build`.
114114

115115
### Mono
116116

@@ -130,20 +130,23 @@ $ certmgr -ssl https://nugetgallery.blob.core.windows.net
130130
$ certmgr -ssl https://nuget.org
131131
```
132132

133-
With any luck, this is the correct set of certificates to get NuGet working on Mono.
133+
This should result in a working Mono setup for use with NuGet.
134134

135135
#### libzmq
136136

137-
Either clone the [ZeroMQ repository][libzmq-2] or [download the sources][zmq-dl], and then follow the build/install instructions for your platform.
137+
Either clone the [ZeroMQ repository][libzmq] or [download the sources][zmq-dl], and then follow the build/install instructions for your platform.
138138
Use the `--with-pgm` option if possible.
139139

140140
#### clrzmq
141141

142142
1. Clone the source.
143143
2. Run `nuget.sh`, which downloads any dependent packages (e.g., Machine.Specifications for acceptance tests).
144-
3. Run `build.sh` to build the project and run the test suite. PGM-related tests will fail if a non-PGM build of libzmq is used.
144+
3. Run `make` to build the project.
145145
4. The resulting binaries will be available in `/build`.
146146

147+
**NOTE**: The combination of 0MQ, MSpec, and Mono currently has issues, so the test suite does not automatically run.
148+
**NOTE**: `clrzmq` only supports x86 builds on Mono at this time
149+
147150
## Issues
148151

149152
Issues should be logged on the [GitHub issue tracker][issues] for this project.
@@ -172,9 +175,8 @@ Pull requests will still be accepted if some of these guidelines are not followe
172175
This project is released under the [LGPL][lgpl] license, as is the native libzmq library. See LICENSE for more details as well as the [0MQ Licensing][zmq-license] page.
173176

174177
[clrzmq-old]: https://github.com/zeromq/clrzmq-old
175-
[clrzmq-nuget-x86]: http://packages.nuget.org/Packages/clrzmq
176-
[clrzmq-nuget-x64]: http://packages.nuget.org/Packages/clrzmq-x64
177-
[libzmq-2]: https://github.com/zeromq/zeromq2-1
178+
[clrzmq-nuget]: http://packages.nuget.org/Packages/clrzmq
179+
[libzmq]: https://github.com/zeromq/libzmq
178180
[zmq-guide]: http://zguide.zeromq.org/page:all
179181
[zmq-example-repo]: https://github.com/imatix/zguide/tree/master/examples/C%23
180182
[zmq-dl]: http://www.zeromq.org/intro:get-the-software

0 commit comments

Comments
 (0)