<commit_before>package rtmp

import (
	"bytes"
	"code.google.com/p/go-uuid/uuid"
	"github.com/elobuff/goamf"
)

func (c *Client) EncodeInvoke(destination string, operation string, vals ...interface{}) (msg *Message, err error) {
	tid := c.NextTransactionId()

	rmh := make(amf.Object)
	rmh["DSRequestTimeout"] = 60
	rmh["DSId"] = c.connectionId
	rmh["DSEndpoint"] = "my-rtmps"

	var body []interface{}
	for _, val := range vals {
		body = append(body, val)
	}

	rm := *amf.NewTypedObject()
	rm.Type = "flex.messaging.messages.RemotingMessage"
	rm.Object["destination"] = destination<commit_msg>Allow invoking of command messages, don't use variadic input on encode invoke methods.<commit_after>package rtmp

import (
	"bytes"
	"code.google.com/p/go-uuid/uuid"
	"github.com/elobuff/goamf"
)

func (c *Client) EncodeInvokeCommand(destination interface{}, operation interface{}, body interface{}) (msg *Message, err error) {
	return c.EncodeInvoke("flex.messaging.messages.CommandMessage", destination, operation, body)
}

func (c *Client) EncodeInvokeRemote(destination interface{}, operation interface{}, body interface{}) (msg *Message, err error) {
	return c.EncodeInvoke("flex.messaging.messages.RemotingMessage", destination, operation, body)
}

func (c *Client) EncodeInvoke(className string, destination interface{}, operation interface{}, body interface{}) (msg *Message, err error) {
	tid := c.NextTransactionId()

	rmh := make(amf.Object)
	rmh["DSRequestTimeout"] = 60
	rmh["DSId"] = c.connectionId
	rmh["DSEndpoint"] = "my-rtmps"

	rm := *amf.NewTypedObject()
	rm.Type = className
	rm.Object["destination"] = destination
{'fraction_non_alphanumeric': 0.14917127071823205, 'fraction_numerical': 0.0024554941682013503, 'mean_word_length': 5.59919028340081, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '299302', 'n_tokens_mistral': 547, 'n_tokens_neox': 532, 'n_words': 129}