Sends a single transactional message.

 For more information on arguments, see: [https://expresspigeon.com/kb/transactional-send].
498550
def send_message(template_id, to, reply_to, from, subject, merge_fields = nil, view_online = false,
                                            click_tracking = true, suppress_address = false, attachments = nil, headers = nil)
      if attachments
          upload(template_id, to, reply_to, from, subject, merge_fields, view_online, click_tracking,
                                                                                    suppress_address, attachments, headers, nil, nil)
        else
          post @endpoint, params = {template_id: template_id, to: to, reply_to: reply_to, from: from,
                                    subject: subject, merge_fields: merge_fields, view_online: view_online,
                                    click_tracking: click_tracking, suppress_address: suppress_address, headers: headers}
      end
    end
939960
def send(self, **kwargs):
        
        payload = self.api_payload()
        payload.update(**kwargs)
        return self.api_method()(**payload)
233760
def sendMessage(self, msg):
        
        if msg._messageType in (1, 2):
            assert msg.destination, 'Failed to specify a message destination'

        if msg.destination is not None:
            if msg.destination[0] == ':':
                p = self.clients.get(msg.destination, None)
            else:
                p = self.busNames.get(msg.destination, None)
                if p:
                    p = p[0]

            # print 'SND: ', msg._messageType, ' to ',  p.uniqueName, 'serial',
            # msg.serial,

            if p:
                p.sendMessage(msg)
            else:
                log.msg(
                    'Invalid bus name in msg.destination: '
                    + msg.destination
                )
        else:
            self.router.routeMessage(msg)
1241285
def send_data(self, message):
        '''
            
        '''
        #logger.debug("TX:\n%s", json.dumps(message, indent=2))
        data = json.dumps(message).encode('utf-8') + b'\n'
        self.transport.write(data)
137562
def send_message(self, *args, **kwargs):
		''''''
		return super(MQBot, self).send_message(*args, **kwargs)
824890
private void sendMessages(final List<MessageEnvelope> msgEnvelopes) {
        try {
            boolean success=BackendOperation.execute(new BackendOperation.Transactional<Boolean>() {
                @Override
                public Boolean call(StoreTransaction txh) throws BackendException {
                    ListMultimap<StaticBuffer,Entry> mutations = ArrayListMultimap.create();
                    for (MessageEnvelope env : msgEnvelopes) {
                        mutations.put(env.key,env.entry);
                        long ts = env.entry.getColumn().getLong(0);
                        log.debug("Preparing to write {} to storage with column/timestamp {}", env, times.getTime(ts));
                    }

                    Map<StaticBuffer,KCVMutation> muts = new HashMap<StaticBuffer, KCVMutation>(mutations.keySet().size());
                    for (StaticBuffer key : mutations.keySet()) {
                        muts.put(key,new KCVMutation(mutations.get(key),KeyColumnValueStore.NO_DELETIONS));
                        log.debug("Built mutation on key {} with {} additions", key, mutations.get(key).size());
                    }
                    manager.storeManager.mutateMany(ImmutableMap.of(store.getName(),muts),txh);
                    log.debug("Wrote {} total envelopes with operation timestamp {}", msgEnvelopes.size(), txh.getConfiguration().getCommitTime());
                    return Boolean.TRUE;
                }
                @Override
                public String toString() {
                    return "messageSending";
                }
            },this, times, maxWriteTime);
            Preconditions.checkState(success);
            log.debug("Wrote {} messages to backend",msgEnvelopes.size());
            for (MessageEnvelope msgEnvelope : msgEnvelopes)
                msgEnvelope.message.delivered();
        } catch (TitanException e) {
            for (MessageEnvelope msgEnvelope : msgEnvelopes)
                msgEnvelope.message.failed(e);
            throw e;
        }
    }
193731
function send_command(RequiresSession, Command, Parameters, callback) {

			// Check for requirements.
			if (RequiresSession && !Member.session_id) {
				if (callback) { callback(Error('No existing session found. Login required.'), null); }
				return;
			}

			// Start a new transaction.
			var transaction_id = 'TX-' + unique_id();

			// Set up the one time response handler.
			Socket.once(Command + '.' + transaction_id,
				function(Err, Response) {
					if (callback) { callback(Err, Response); }
					return;
				});

			// Clone the command parameters and mark it with our control structure.
			var parameters = JSON.parse(JSON.stringify(Parameters));
			parameters.control = {
				transaction_id: transaction_id,
				session_id: Member.session_id
			};

			// Invoke the function.
			Socket.emit(Command, parameters);

			return;
		}
909220
def send(self, message, callback=None):
        """"""
        assert isinstance(message, velbus.Message)
        self._write_queue.put_nowait((message, callback))
266026
public void send(Message msg) throws Exception {
        num_senders.incrementAndGet();
        long size=msg.size();

        lock.lock();
        try {
            if(count + size >= transport.getMaxBundleSize())
                sendBundledMessages();

            addMessage(msg, size);

            // at this point, we haven't sent our message yet !
            if(num_senders.decrementAndGet() == 0) // no other sender threads present at this time
                sendBundledMessages();
            // else there are other sender threads waiting, so our message will be sent by a different thread
        }
        finally {
            lock.unlock();
        }
    }
397318
def send_message(self, msg):
        

        if self.socket is not None:

            msg.version = self.PROTOCOL_VERSION
            serialized = msg.SerializeToString()
            data = struct.pack(">I", len(serialized)) + serialized

            #print("Sending message: %s" % msg)
            try:
                self.socket.send(data)
            except Exception as e:
                #self.state = "Disconnected"
                pass
605353
public void sendRequest(ClientTransaction ct) throws TransactionDoesNotExistException, SipException {
		final Request request = ct.getRequest();
		ensureCorrectDialogLocalTag(request);
		if (tracer.isInfoEnabled()) {
			tracer.info(String.valueOf(ct)+" sending request:\n"+request);
		}
		wrappedDialog.sendRequest(((ClientTransactionWrapper)ct).getWrappedClientTransaction());		
	}
857099
def send_response(self, transaction):
        
        logger.debug("send_response - " + str(transaction.response))
        if transaction.response.type is None:
            if transaction.request.type == defines.Types["CON"] and not transaction.request.acknowledged:
                transaction.response.type = defines.Types["ACK"]
                transaction.response.mid = transaction.request.mid
                transaction.response.acknowledged = True
                transaction.completed = True
            elif transaction.request.type == defines.Types["NON"]:
                transaction.response.type = defines.Types["NON"]
            else:
                transaction.response.type = defines.Types["CON"]
                transaction.response.token = transaction.request.token

        if transaction.response.mid is None:
            transaction.response.mid = self.fetch_mid()
            try:
                host, port = transaction.response.destination
            except AttributeError:
                return
            key_mid = str_append_hash(host, port, transaction.response.mid)
            self._transactions[key_mid] = transaction

        transaction.request.acknowledged = True
        return transaction
712213
def sendMessage(self, to, message, extra={}):
        
        to = to if isinstance(to, list) else [to]
        to = [str(i) for i in to]

        data = {'to': ','.join(to), 'text': message}
        data = self.merge(data, {'callback': 7, 'mo': 1}, extra)

        try:
            content = self.parseLegacy(self.request('http/sendmsg', data));
        except ClickatellError as e:
            # The error that gets catched here will only be raised if the request was for
            # one number only. We can safely assume we are only dealing with a single response
            # here.
            content = {'error': e.message, 'errorCode': e.code, 'To': to[0]}

        # Force all responses to behave like a list, for consistency
        content = content if isinstance(content, list) else [content]
        result = []

        # Sending messages will also result in a "stable" response. The reason
        # for this is that we can't actually know if the request failed or not...a message
        # that could not be delivered is different from a failed request...so errors are returned
        # per message. In the case of global failures (like authentication) all messages will contain
        # the specific error as part of the response body.
        for index, entry in enumerate(content):
            entry = self.merge({'ID': False, 'To': to[index], 'error': False, 'errorCode': False}, entry)
            result.append({
                'id': entry['ID'],
                'destination': entry['To'],
                'error': entry['error'],
                'errorCode': entry['errorCode']
            });

        return result
308946
def send_message(self, message, sign=True):
		
		self.check_connected()
		self.protocol.send_message(message, sign)
154657
def send_multipart(self, *args, **kwargs):
        """"""
        self.__in_send_multipart = True
        try:
            msg = super(GreenSocket, self).send_multipart(*args, **kwargs)
        finally:
            self.__in_send_multipart = False
            self.__state_changed()
        return msg
962337
def send_message(self, message):
        
        if self._error:
            raise compat.saved_exc(self._error)
        elif self._transport is None:
            raise JsonRpcError('not connected')
        self._version.check_message(message)
        self._writer.write(serialize(message))
627814
public function send()
    {
        if (isset($this->functions)) {
            $arguments = func_get_args();
            $method = array_splice($arguments, 0, 1)[0];
            $callback = array_pop($arguments);

            if (!is_string($method)) {
                throw new InvalidArgumentException('Please make sure the method is string.');
            }

            $functions = [];
            foreach ($this->functions as $function) {
                if ($function["name"] === $method) {
                    $functions[] = $function;
                }
            };
            if (count($functions) < 1) {
                throw new InvalidArgumentException('Please make sure the method exists.');
            }
            if (is_callable($callback) !== true) {
                throw new \InvalidArgumentException('The last param must be callback function.');
            }

            // check the last one in arguments is transaction object
            $argsLen = count($arguments);
            $transaction = [];
            $hasTransaction = false;

            if ($argsLen > 0) {
                $transaction = $arguments[$argsLen - 1];
            }
            if (
                isset($transaction["from"]) ||
                isset($transaction["to"]) ||
                isset($transaction["gas"]) ||
                isset($transaction["gasPrice"]) ||
                isset($transaction["value"]) ||
                isset($transaction["data"]) ||
                isset($transaction["nonce"])
            ) {
                $hasTransaction = true;
            } else {
                $transaction = [];
            }

            $params = [];
            $data = "";
            $functionName = "";
            foreach ($functions as $function) {
                if ($hasTransaction) {
                    if ($argsLen - 1 !== count($function['inputs'])) {
                        continue;
                    } else {
                        $paramsLen = $argsLen - 1;
                    }
                } else {
                    if ($argsLen !== count($function['inputs'])) {
                        continue;
                    } else {
                        $paramsLen = $argsLen;
                    }
                }
                try {
                    $params = array_splice($arguments, 0, $paramsLen);
                    $data = $this->ethabi->encodeParameters($function, $params);
                    $functionName = Utils::jsonMethodToString($function);
                } catch (InvalidArgumentException $e) {
                    continue;
                }
                break;
            }
            if (empty($data) || empty($functionName)) {
                throw new InvalidArgumentException('Please make sure you have put all function params and callback.');
            }
            $functionSignature = $this->ethabi->encodeFunctionSignature($functionName);
            $transaction['to'] = $this->toAddress;
            $transaction['data'] = $functionSignature . Utils::stripZero($data);

            $this->eth->sendTransaction($transaction, function ($err, $transaction) use ($callback){
                if ($err !== null) {
                    return call_user_func($callback, $err, null);
                }
                return call_user_func($callback, null, $transaction);
            });
        }
    }