Send a ping message.
978795
def ping(self):
        
        self.last_ping = time.time()
        try:
            self.send_message({MESSAGE_TYPE: TYPE_PING})
        except NotConnected:
            self._socket_client.logger.error("Chromecast is disconnected. " +
                                             "Cannot ping until reconnected.")
907798
private void sendReset() {
        if (pullMode) {
            Ping recorded = new Ping();
            recorded.setEventType(Ping.RECORDED_STREAM);
            recorded.setValue2(streamId);
            // recorded 
            RTMPMessage recordedMsg = RTMPMessage.build(recorded);
            doPushMessage(recordedMsg);
        }
        Ping begin = new Ping();
        begin.setEventType(Ping.STREAM_BEGIN);
        begin.setValue2(streamId);
        // begin 
        RTMPMessage beginMsg = RTMPMessage.build(begin);
        doPushMessage(beginMsg);
        // reset
        ResetMessage reset = new ResetMessage();
        doPushMessage(reset);
    }
866043
def _send(self, msg):
        """"""
        if isinstance(msg, six.binary_type):
            method = uwsgi.websocket_send_binary
        else:
            method = uwsgi.websocket_send
        if self._req_ctx is not None:
            method(msg, request_context=self._req_ctx)
        else:
            method(msg)
1241190
def ping():
    '''
    
    '''
    try:
        session, cookies, csrf_token = logon()
        logout(session, cookies, csrf_token)
    except salt.exceptions.CommandExecutionError:
        return False
    except Exception as err:
        log.debug(err)
        return False
    return True
763525
def send(self, *args, **kwargs):
        """"""
        conn = SMTP(*args, **kwargs)
        send_result = conn.send(self)
        return conn, send_result
598505
def ping(self):
        """"""

        randomToken = ''.join(random.choice(string.ascii_uppercase + string.ascii_lowercase + string.digits) for x in range(32))

        r = self.doQuery('ping?data=' + randomToken)

        if r.status_code == 200:  # Query ok ?
            if r.json()['data'] == randomToken:  # Token equal ?
                return True
        return False
1043712
def ping(self):
        
        start = time.time()
        self._conn.ping()
        return (time.time() - start)
92951
def _send(self, msg, buffers=None):
        """"""
        if self.comm is not None and self.comm.kernel is not None:
            self.comm.send(data=msg, buffers=buffers)
630653
private function sendPing()
    {
        $this->timeSincePingReq = time();
        $payload = chr(0xc0).chr(0x00);
        fwrite($this->socket, $payload, 2);

        $this->debugMessage("PING sent");
    }
132499
def send(self, message_data, delivery_mode=None):
        """"""
        self.publisher.send(message_data, delivery_mode=delivery_mode)
1237150
def send(self, data):
        """"""
        self._send_data(int_to_hex(len(data)))

        self._send_data(data)
1328948
public void ping(long id, long timeout, PingCallback callback) {
        pingCallbacks.put(id, callback);
        scheduller.postMessage(new MTPing(id), false, timeout);
        actionsActor.send(new PingTimeout(id), timeout);
    }
789214
def send_msg(self, message):
        
        packet = self.driver.send(message)
        self.send_bytes(packet)
564756
async def send(self, message: Union[str, bytes],
                   binary: bool=False,
                   compress: Optional[int]=None) -> None:
        """"""
        if isinstance(message, str):
            message = message.encode('utf-8')
        if binary:
            await self._send_frame(message, WSMsgType.BINARY, compress)
        else:
            await self._send_frame(message, WSMsgType.TEXT, compress)
1301232
def send(self, out, addr=_MDNS_ADDR, port=_MDNS_PORT):
        """"""
        # This is a quick test to see if we can parse the packets we generate
        #temp = DNSIncoming(out.packet())
        for i in self.intf.values():
            try:
                return i.sendto(out.packet(), 0, (addr, port))
            except:
                traceback.print_exc()
                # Ignore this, it may be a temporary loss of network connection
                return -1
196152
def ping(timeout=nil)
      request = Message::Ping.new(Thread.mailbox)
      send_request request, :request, timeout
    end
1359602
def send_message(self,message):
        
        if self._state == STATE_DISCONNECTED:
            raise Exception("WAMP is currently disconnected!")
        message = message.as_str()
        logger.debug("SND>: {}".format(message))
        if not self.ws:
            raise Exception("WAMP is currently disconnected!")
        self.ws.send(message)