func sendData(ctx context.Context, callee *client.Client, args wamp.List) client.InvokeResult {
	h := sha256.New()
	h.Write([]byte(gettysburg))
	hash64 := base64.StdEncoding.EncodeToString(h.Sum(nil))
	b := bytes.NewBuffer([]byte(gettysburg))
	var chunkSize int
	if len(args) != 0 {
		i, _ := wamp.AsInt64(args[0])
		chunkSize = int(i)
	}
	if chunkSize == 0 {
		chunkSize = 64
	}
	for chunk := b.Next(chunkSize); len(chunk) != 0; chunk = b.Next(chunkSize) {
		err := callee.SendProgress(ctx, wamp.List{string(chunk)}, nil)
		if err != nil {
			return client.InvokeResult{Err: wamp.ErrCanceled}
		}
	}
	return client.InvokeResult{Args: wamp.List{hash64}}
}
sendData sends the body of data in chunks of the requested size.  The final
result message contains the sha256 hash of the data to allow the caller to
verify that all the data was correctly received.
package main
import (
	"bytes"
	"context"
	"crypto/sha256"
	"encoding/base64"
	"log"
	"os"
	"os/signal"
	"github.com/gammazero/nexus/v3/client"
	"github.com/gammazero/nexus/v3/examples/newclient"
	"github.com/gammazero/nexus/v3/wamp"
)
const procedureName = "example.progress.text"
func main() {
	logger := log.New(os.Stdout, "CALLEE> ", 0)
	callee, err := newclient.NewClient(logger)
	if err != nil {
		logger.Fatal(err)
	}
	defer callee.Close()
	handler := func(ctx context.Context, inv *wamp.Invocation) client.InvokeResult {
		return sendData(ctx, callee, inv.Arguments)
	}
	if err = callee.Register(procedureName, handler, nil); err != nil {
		logger.Fatal("Failed to register procedure:", err)
	}
	logger.Println("Registered procedure", procedureName, "with router")
	sigChan := make(chan os.Signal, 1)
	signal.Notify(sigChan, os.Interrupt)
	select {
	case <-sigChan:
	case <-callee.Done():
		logger.Print("Router gone, exiting")
		return  
	}
	if err = callee.Unregister(procedureName); err != nil {
		logger.Println("Failed to unregister procedure:", err)
	}
}