3 Examples

There are several examples that come with the toolkit.

View example code using edit examples/example_name

ie:

edit examples/zmq_example1

3.1 Example1

Simple client REQ socket example that attempts to connect to a server and send a hello command and get back the response.

edit examples/zmq_example1

3.2 Example2

Simple server REP socket example that creates the server that the client from example 1 will connect to and responds back to client ’requests’

edit examples/zmq_example2

3.3 Example3

Simple server PUB socket example that creates ’weather’ server sends weather updates for random zip codes.

edit examples/zmq_example3

3.4 Example4

Simple client SUB socket example that creates client that connects to the ’weather’ server and subscribes for weather updates from zip-code 10001.

edit examples/zmq_example4

3.5 Example5

Simple client STREAM socket example that creates client that connects to octave.org and posts HEAD request.

edit examples/zmq_example5