func isRemoteMethod(method reflect.Method) bool {
	mt := method.Type
	if method.PkgPath != "" {
		return false
	}
	if mt.NumIn() != 2 && mt.NumIn() != 3 {
		return false
	}
	if t1 := mt.In(1); !t1.Implements(typeOfContext) {
		return false
	}
	if mt.NumIn() == 3 {
		if t2 := mt.In(2); !t2.Implements(typeOfProtoMsg) {
			return false
		}
	}
	if mt.NumOut() != 2 {
		return false
	}
	if (mt.Out(0).Kind() != reflect.Ptr) || mt.Out(1) != typeOfError {
		return false
	}
	if o0 := mt.Out(0); !o0.Implements(typeOfProtoMsg) {
		return false
	}
	return true
}
isRemoteMethod decide a method is suitable remote method
package component
import (
	"context"
	"reflect"
	"unicode"
	"unicode/utf8"
	"github.com/golang/protobuf/proto"
	"github.com/topfreegames/pitaya/v2/conn/message"
)
var (
	typeOfError    = reflect.TypeOf((*error)(nil)).Elem()
	typeOfBytes    = reflect.TypeOf(([]byte)(nil))
	typeOfContext  = reflect.TypeOf(new(context.Context)).Elem()
	typeOfProtoMsg = reflect.TypeOf(new(proto.Message)).Elem()
)
func isExported(name string) bool {
	w, _ := utf8.DecodeRuneInString(name)
	return unicode.IsUpper(w)
}