Send a message through this connection
556168
public ChannelFuture send(Message message) throws NotConnectedException {
        if (!connected) {
            throw new NotConnectedException();
        }

        if (log.isDebugEnabled()) {
            log.debug(">>> {}", message.toString().trim());
        }

        return channel.write(message);
    }
204487
def send(self, msg_dict):
        """"""
        message = ejson.dumps(msg_dict)
        super(DDPSocket, self).send(message)
        self._debug_log('<<<{}'.format(message))
1348453
def send(self, send_string, newline=None):
        """"""
        self.current_send_string = send_string
        newline = newline if newline is not None else self.newline

        self.channel.send(send_string + newline)
405048
def _send(self, data):
        """"""
        if not self._sock:
            self.connect()
        self._do_send(data)
890776
def send_file_message(self, filename):
        """"""
        data = self._readFile(filename)
        self.print_debug_message(data)
        self.socket.send(data)
299648
def send(self, message):
        """"""
        if isinstance(message, bytes):
            message = message.decode("utf8")

        with self.send_lock:
            try:
                self.ws.send(message)
            except socket.error:
                chat_backend.unsubscribe(self)
794814
def send(self, msg):
        """"""
        def reconnect(e):
            self.log.error('send error, reconnecting...', exc_info=True)
            self.connect_ensime_server()
            if self.ws:
                self.ws.send(msg + "\n")

        self.log.debug('send: in')
        if self.running and self.ws:
            with catch(websocket.WebSocketException, reconnect):
                self.log.debug('send: sending JSON on WebSocket')
                self.ws.send(msg + "\n")
971733
def send_msg(self, connection, data):
        
        # serialize as JSON
        msg = json.dumps(data)
        # Prefix each message with a 4-byte length (network byte order)
        msg = struct.pack('>I', len(msg)).decode() + msg
        connection.sendall(msg.encode())
        return
842964
def _send(self, message):
        
        if not message.recipients():
            return False
        try:
            self.connection.sendmail(
                message.sender,
                message.recipients(),
                message.message().as_string(),
            )
        except Exception as e:
            logger.error(
                "Error sending a message to server %s:%s: %s",
                self.host,
                self.port,
                e,
            )
            if not self.fail_silently:
                raise
            return False
        return True
299994
public void sendMessage(Message message) {
    OutgoingPacket opk = new OutgoingPacket(REQID.zeroREQID, message);
    socketChannelHelper.sendPacket(opk);
  }
1038709
def send(self, message):  # usually a json string...
        
        for transport in self.transports.values():
            transport.protocol.sendMessage(message)
562358
def sendmess(self, msgtype, payload, flags=0, size=0, offset=0, timeout=0):
        

        flags |= self.flags
        assert not (flags & FLG_PERSISTENCE)

        with self._new_connection() as conn:
            ret, _, data = conn.req(
                msgtype, payload, flags, size, offset, timeout)

        return ret, data
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))
171140
def send_message(self, message, callback):
        
        
        if self.__callback is not None:
            raise ProgrammingError('connection already in use')

        if callback:
            err_callback = functools.partial(callback, None)
        else:
            err_callback = None

        # Go and update err_callback for async jobs in queue if any
        for job in self.__job_queue:
            # this is a dirty hack and I hate it, but there is no way of setting the correct
            # err_callback during the connection time
            if isinstance(job, asyncjobs.AsyncJob):
                job.update_err_callback(err_callback)

        if not self.__alive:
            if self.__autoreconnect:
                self.__connect(err_callback)
            else:
                raise InterfaceError('connection invalid. autoreconnect=False')
        
        # Put the current message on the bottom of the queue
        self._put_job(asyncjobs.AsyncMessage(self, message, callback), 0)
        self._next_job()
74722
public function send()
    {
        $args = func_get_args();
        if (count($args) > 1) {
            $message = call_user_func_array('sprintf', $args);
        } else {
            $message = $args[0];
        }
        $this->response->send($message);
    }
928459
def send(self):
        
        try:
            for mx in self.mxrecords:
                logging.info('Connecting to {} {}...'.format(mx, self.port))
                server = smtplib.SMTP(mx, self.port)
                server.set_debuglevel(logging.root.level < logging.WARN)
                server.sendmail(
                    self.sender, [self.recipient], self.message.as_string())
                server.quit()
                return True
        except Exception as e:
            logging.error(e)
            if (isinstance(e, IOError)
                    and e.errno in (errno.ENETUNREACH, errno.ECONNREFUSED)):
                logging.error(
                    'Please check that port {} is open'.format(self.port))
            if logging.root.level < logging.WARN:
                raise e
        return False
575522
def send(self, data):
        
        self.logger.debug('Send data: {}'.format(data))

        if not self.connected:
            self.logger.warning('Connection not established. Return...')
            return

        self.websocket.send(json.dumps(data))