本文整理了Java中okhttp3.WebSocket.queueSize()
方法的一些代码示例,展示了WebSocket.queueSize()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebSocket.queueSize()
方法的具体详情如下:
包路径:okhttp3.WebSocket
类名称:WebSocket
方法名:queueSize
[英]Returns the size in bytes of all messages enqueued to be transmitted to the server. This doesn't include framing overhead. It also doesn't include any bytes buffered by the operating system or network intermediaries. This method returns 0 if no messages are waiting in the queue. If may return a nonzero value after the web socket has been canceled; this indicates that enqueued messages were not transmitted.
[中]返回排队要传输到服务器的所有消息的大小(字节)。这不包括框架开销。它也不包括操作系统或网络中介缓冲的任何字节。如果队列中没有消息等待,则此方法返回0。如果在取消web套接字后可能返回非零值;这表明排队的消息未被传输。
代码示例来源:origin: watson-developer-cloud/java-sdk
while (socket.queueSize() > QUEUE_SIZE_LIMIT) {
Thread.sleep(QUEUE_WAIT_MILLIS);
代码示例来源:origin: com.ibm.watson.developer_cloud/speech-to-text
while (socket.queueSize() > QUEUE_SIZE_LIMIT) {
Thread.sleep(QUEUE_WAIT_MILLIS);
内容来源于网络,如有侵权,请联系作者删除!