<commit_before>//
//  Majordomo Protocol client example - asynchronous.
//  Uses the mdcli API to hide all MDP aspects
//
//  Lets us build this source without creating a library
package main

import (
	"github.com/pebbe/zmq3/examples/mdapi"

	"fmt"
	"os"
)

func main() {
	var verbose bool
	if len(os.Args) > 1 && os.Args[1] == "-v" {
		verbose = true
	}
	session, _ := mdapi.NewMdcli2("tcp://localhost:5555", verbose)

    var count int
    for count = 0; count < 100000; count++ {
		session.Send("echo", "Hello world")
    }
    for count = 0; count < 100000; count++ {
		_, err := session.Recv()
		if err != nil {
			break	      //  Interrupted by Ctrl-C
		}
    }
    fmt.Printf("%d replies received\n", count)
}<commit_msg>Modified example: mdclient2<commit_after>//
//  Majordomo Protocol client example - asynchronous.
//  Uses the mdcli API to hide all MDP aspects
//
//  Lets us build this source without creating a library
package main

import (
	"github.com/pebbe/zmq3/examples/mdapi"

	"fmt"
	"log"
	"os"
)

func main() {
	var verbose bool
	if len(os.Args) > 1 && os.Args[1] == "-v" {
		verbose = true
	}
	session, _ := mdapi.NewMdcli2("tcp://localhost:5555", verbose)

	var count int
	for count = 0; count < 100000; count++ {
		err := session.Send("echo", "Hello world")
		if err != nil {
			log.Println("Send:", err)
			break
		}
	}
	for count = 0; count < 100000; count++ {
		_, err := session.Recv()
		if err != nil {
			log.Println("Recv:", err)
			break
		}
	}
	fmt.Printf("%d replies received\n", count)
}
{'fraction_non_alphanumeric': 0.15344262295081967, 'fraction_numerical': 0.029508196721311476, 'mean_word_length': 2.922879177377892, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '7126279', 'n_tokens_mistral': 624, 'n_tokens_neox': 550, 'n_words': 161}