func NewClient(
	le *types.ListenEndpoint, pushCh chan *types.Action) (Client, error) {

	trans, err := translate.StringToTranslator(le.Format)
	if err != nil {
		return nil, err
	}

	switch le.Type {
	case "tcp":
		return net.NewTcpClient(trans, le.Addr, pushCh)
	default:
		return nil, errors.New("unknown connection type")
	}
}
// NewClient takes in a format (ex. json), a connection type (ex. tcp) and an
// address where a hyrax server can be found (including the port). It also takes
// in a push channel, which can be nil if you want to ignore push messages. It
// returns a Client created from your specifications, or an error.
NewClient takes in a format (ex. json), a connection type (ex. tcp) and an
address where a hyrax server can be found (including the port). It also takes
in a push channel, which can be nil if you want to ignore push messages. It
returns a Client created from your specifications, or an error.
// NewClient takes in a format ( ex . json ) a connection type ( ex . tcp ) and an // address where a hyrax server can be found ( including the port ) . It also takes // in a push channel which can be nil if you want to ignore push messages . It // returns a Client created from your specifications or an error .
func NewClient(
	le *types.ListenEndpoint, pushCh chan *types.Action) (Client, error) {
	trans, err := translate.StringToTranslator(le.Format)
	if err != nil {
		return nil, err
	}
	switch le.Type {
	case "tcp":
		return net.NewTcpClient(trans, le.Addr, pushCh)
	default:
		return nil, errors.New("unknown connection type")
	}
}
func NewClient ( le * types . ListenEndpoint , pushCh chan * types . Action ) ( Client , error ) { trans , err := translate . StringToTranslator ( le . Format ) if err != nil { return nil , err } switch le . Type { case " " : return net . NewTcpClient ( trans , le . Addr , pushCh ) default : return nil , errors . New ( " " ) } }
NewClient takes in a format (ex.
NewClient takes in a format ( ex .