Handle the SEND command: Delivers a message to a queue or topic (default).
505718
def send(self, frame):
        
        dest = frame.headers.get('destination')
        if not dest:
            raise ProtocolError('Missing destination for SEND command.')

        if dest.startswith('/queue/'):
            self.engine.queue_manager.send(frame)
        else:
            self.engine.topic_manager.send(frame)
1320282
def __send_command(self, command, args=[]):
        ''''''
        self.ws.send(json.dumps({"op": command, "args": args}))
253362
def send_push(type, payload = nil, target = nil, opts = {})
      cmd = {:name => :send_push, :type => type, :payload => payload, :target => target, :options => opts}
      # Need to execute on EM main thread where command client is running
      EM.next_tick { @client.send_command(cmd) }
    end
1321875
def send(self, command, reps=REPS, wait=MIN_WAIT):
        
        # Enqueue the command.
        self._command_queue.put((command, reps, wait))
        # Wait before accepting another command.
        # This keeps individual groups relatively synchronized.
        sleep = reps * wait * self.active
        if command.select and self._selected_number != command.group_number:
            sleep += SELECT_WAIT
        time.sleep(sleep)
479001
def _handle_one(self):
        
        ready_to_read, ready_to_write, in_error = select.select(
            [self.request], [self.request], [self.request], 0.1)

        if in_error:
            raise self.Disconnect()

        # Write any commands to the client
        while self.send_queue and ready_to_write:
            msg = self.send_queue.pop(0)
            self._send(msg)

        # See if the client has any commands for us.
        if ready_to_read:
            self._handle_incoming()
1005347
function deliverMessage (message) {
  workerIterator((worker) => {
    if (this.process.pid === worker.process.pid) {
      return
    }
    debug('delivering message to %s', worker.process.pid)
    worker.send(message)
  })
}
1254703
def send_command(self, command, arg=None):
    
    if arg is not None:
      command = '%s:%s' % (command, arg)
    self._write(six.StringIO(command), len(command))
936545
def send(self, command, message=None):
        ''''''
        if message:
            joined = command + constants.NL + util.pack(message)
        else:
            joined = command + constants.NL
        if self._blocking:
            for sock in self.socket():
                sock.sendall(joined)
        else:
            self._pending.append(joined)
599407
def quick_send(self, send, echo=None, loglevel=logging.INFO):
		
		shutit = self.shutit
		shutit.log('Quick send: ' + send, level=loglevel)
		res = self.sendline(ShutItSendSpec(self,
		                                    send=send,
		                                    check_exit=False,
		                                    echo=echo,
		                                    fail_on_empty_before=False,
		                                    record_command=False,
		                                    ignore_background=True))
		if not res:
			self.expect(self.default_expect)
402762
function sendMessage(command, opt_value, opt_transfer) {
    // TODO(benvanik): attempt to use webkitPostMessage
    originalPostMessage.call(goog.global, {
      '__wtf_worker_msg__': true,
      'command': command,
      'value': opt_value || null
    }, []);
  }
218182
def handle_event(self, packet):
        """"""
        if packet.get('command'):
            task = self.send_command_ack(packet['id'], packet['command'])
            self.loop.create_task(task)
1190016
def cmd(send, msg, args):
    
    parser = arguments.ArgParser(args['config'])
    parser.add_argument('delay')
    parser.add_argument('msg', nargs='+')
    try:
        cmdargs = parser.parse_args(msg)
    except arguments.ArgumentException as e:
        send(str(e))
        return
    if isinstance(cmdargs.msg, list):
        cmdargs.msg = ' '.join(cmdargs.msg)
    cmdargs.delay = parse_time(cmdargs.delay)
    if cmdargs.delay is None:
        send("Invalid unit.")
    elif cmdargs.delay < 0:
        send("Time travel not yet implemented, sorry.")
    else:
        ident = args['handler'].workers.defer(cmdargs.delay, False, send, cmdargs.msg)
        send("Message deferred, ident: %s" % ident)
961792
async def send(self, message_type, message_content, timeout=None):
        
        return await self._sender.send(
            message_type, message_content, timeout=timeout)
70823
def send_command(self, obj, command, *arguments):
        
        index_command = obj._build_index_command(command, *arguments)
        self.chassis_list[obj.chassis].sendQueryVerify(index_command)
1243801
def SendCommand(self, Command):
        
        try:
            self._Api.send_command(Command)
        except SkypeAPIError:
            self.ResetCache()
            raise
58269
async def _send_manager_command(self, *args, **kwargs):
        """"""
        resp = await send_manager_command(*args, **kwargs)

        if resp is False:
            await self.terminate()
649202
def send(self, message):
        """"""
        if not message:
            return
        topic, payload, qos = self._parse_message_to_mqtt(message)
        try:
            _LOGGER.debug('Publishing %s', message.strip())
            self._pub_callback(topic, payload, qos, self._retain)
        except Exception as exception:  # pylint: disable=broad-except
            _LOGGER.exception('Publish to %s failed: %s', topic, exception)