func (c *rpcClient) SetOption(opts ...interface{}) error {
	for _, o := range opts {
		switch v := o.(type) {
		case OptionOther:
			return c.socket.SetOption(v.Name, v.Value)
		case OptionDialAsync:
			return c.socket.SetOption(mangos.OptionDialAsynch, v)
		case OptionReconnectTime:
			return c.socket.SetOption(mangos.OptionReconnectTime, v)
		case OptionMaxReconnectTime:
			return c.socket.SetOption(mangos.OptionMaxReconnectTime, v)
		case OptionTLSConfig:
			return c.socket.SetOption(mangos.OptionTLSConfig, v)
		case OptionRetryTime:
			return c.socket.SetOption(mangos.OptionRetryTime, v)
		default:
			return errors.New("unknown option")
		}
	}
	return nil
}
NB: We don't use the mangos timeout options.  Instead we rely on the
context to provide a global timeout which encompasses both the send
and the receive time.
package client
import (
	"bytes"
	"context"
	"errors"
	"fmt"
	"github.com/vmihailenco/msgpack"
	"go.nanomsg.org/mangos/v3"
	"go.nanomsg.org/mangos/v3/protocol/req"
	_ "go.nanomsg.org/mangos/v3/transport/all"
	"go.nanomsg.org/rome"
	"go.nanomsg.org/rome/rpc"
)
type Client interface {
	Call(ctx context.Context, name string, args interface{}, results interface{}) error
	Dial(url string, opts ...interface{}) error
	Listen(url string, opts ...interface{}) error
	SetOption(opts ...interface{}) error
	Close()
}
func NewClient() Client {
	c := &rpcClient{}
	c.socket, _ = req.NewSocket()
	return c
}
type rpcClient struct {
	socket mangos.Socket
}
func (c *rpcClient) Close() {
	_ = c.socket.Close()
}
type OptionOther = rome.OptionOther
type OptionDialAsync = rome.OptionDialAsync
type OptionReconnectTime = rome.OptionReconnectTime
type OptionMaxReconnectTime = rome.OptionMaxReconnectTime
type OptionTLSConfig = rome.OptionTLSConfig
type OptionRetryTime = rome.OptionRetryTime
type Nil = rome.Nil
type Error = rpc.Error