<commit_before># goczmq [![Build Status](https://travis-ci.org/zeromq/goczmq.svg?branch=master)](https://travis-ci.org/zeromq/goczmq) [![Doc Status](https://godoc.org/github.com/zeromq/goczmq?status.png)](https://godoc.org/github.com/zeromq/goczmq)

## Introduction
A golang interface to the [CZMQ v3](http://czmq.zeromq.org) API.

## Install
### Dependencies
* [libsodium](https://github.com/jedisct1/libsodium)
* [libzmq](https://github.com/zeromq/libzmq)
* [czmq](https://github.com/zeromq/czmq)

### For CMZQ >= 4.0
```
go get gopkg.in/zeromq/goczmq.v4
```
### For CZMQ Before 4.0
```
go get gopkg.in/zeromq/goczmq.v1
```
## Usage
### Direct CZMQ Sock API
#### Example
```go
package main

import (
	"log"

	"github.com/zeromq/goczmq"
)

func main() {
	// Create a router socket and bind it to port 5555.
	router, err := goczmq.NewRouter("tcp://*:5555")
	if err != nil {
		log.Fatal(err)
	}
	defer router.Destroy()

	log.Println("router created and bound")

	// Create a dealer socket and connect it to the router.
	dealer, err := goczmq.NewDealer("tcp://127.0.0.1:5555")<commit_msg>Problem: README out of date<commit_after># goczmq [![Build Status](https://travis-ci.org/zeromq/goczmq.svg?branch=master)](https://travis-ci.org/zeromq/goczmq) [![Doc Status](https://godoc.org/github.com/zeromq/goczmq?status.png)](https://godoc.org/github.com/zeromq/goczmq)

## Introduction
A golang interface to the [CZMQ v4.2](http://czmq.zeromq.org) API.

## Install
### Dependencies
* [libsodium](https://github.com/jedisct1/libsodium)
* [libzmq](https://github.com/zeromq/libzmq)
* [czmq](https://github.com/zeromq/czmq)

### For CZMQ => 4.2
Note: under heavy development.
```
go get github.com/zeromq/goczmq
```

### For CMZQ = 4.0
```
go get gopkg.in/zeromq/goczmq.v4
```
### For CZMQ Before 4.0
```
go get gopkg.in/zeromq/goczmq.v1
```
## Usage
### Direct CZMQ Sock API
#### Example
```go
package main

import (
	"log"

	"github.com/zeromq/goczmq"
)

func main() {
	// Create a router socket and bind it to port 5555.
	router, err := goczmq.NewRouter("tcp://*:5555")
	if err != nil {
		log.Fatal(err)
	}
	defer router.Destroy()

	log.Println("router created and bound")

	// Create a dealer socket and connect it to the router.
	dealer, err := goczmq.NewDealer("tcp://127.0.0.1:5555")
{'fraction_non_alphanumeric': 0.19218955682316805, 'fraction_numerical': 0.02413339183852567, 'mean_word_length': 4.181818181818182, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 14, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4273919', 'n_tokens_mistral': 1008, 'n_tokens_neox': 939, 'n_words': 179}