func BrokerTask() {
	frontend, _ := zmq.NewSocket(zmq.DEALER)
	frontend.Bind("tcp://*:5555")
	backend, _ := zmq.NewSocket(zmq.DEALER)
	backend.Bind("tcp://*:5556")
	zmq.Proxy(frontend, backend, nil)
}
Here is the broker task. It uses the zmq_proxy function to switch
messages between frontend and backend:
package main
import (
	zmq "github.com/pebbe/zmq4"
	"fmt"
	"time"
)
func ClientTask(pipe chan<- bool) {
	client, _ := zmq.NewSocket(zmq.DEALER)
	client.Connect("tcp://localhost:5555")
	fmt.Println("Setting up test...")
	time.Sleep(100 * time.Millisecond)
	fmt.Println("Synchronous round-trip test...")
	start := time.Now()
	var requests int
	for requests = 0; requests < 10000; requests++ {
		client.Send("hello", 0)
		client.Recv(0)
	}
	fmt.Println(requests, "calls in", time.Since(start))
	fmt.Println("Asynchronous round-trip test...")
	start = time.Now()
	for requests = 0; requests < 100000; requests++ {
		client.Send("hello", 0)
	}
	for requests = 0; requests < 100000; requests++ {
		client.Recv(0)
	}
	fmt.Println(requests, "calls in", time.Since(start))
	pipe <- true
}
func WorkerTask() {
	worker, _ := zmq.NewSocket(zmq.DEALER)
	worker.Connect("tcp://localhost:5556")
	for {
		msg, _ := worker.RecvMessage(0)
		worker.SendMessage(msg)
	}
}