示例#1
0
文件: import.go 项目: AurSir/aurarath
func (i *Import) call(function string, parameter []byte, ctype messages.CallType) (uuid string) {

	req := messages.NewRequest(i.UUID(), function, ctype, parameter)
	if i.Service.Connected().Completed() {
		i.deliverRequest(req)
	} else {
		i.pending = append(i.pending, req)
	}
	return req.UUID
}
示例#2
0
func (i *Import) newRequest(function string, parameter interface{}, ctype messages.CallType) (req *messages.Request) {

	req = messages.NewRequest(i.UUID(), function, ctype, parameter)

	return
}