WebSocket.bufferedAmount
は send()
の呼び出しによってキューに入れられてはいますが、まだネットワークに送信されていないデータのバイト数を返す読み取り専用のプロパティです。この値は、一度キューに入れられたデータすべてが送信されると 0 にリセットされます。なお、コネクションが閉じられたときは、 0 にリセットされません。send()
を呼び出し続けると、この値は大きくなっていきます。
構文
var bufferedAmount = aWebSocket.bufferedAmount;
値
符号なしのロング型
仕様書
Specification | Status | Comment |
---|---|---|
HTML Living Standard WebSocket: bufferedAmount の定義 |
現行の標準 | Initial definition |
ブラウザ互換性
BCD tables only load in the browser
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.