Description
WebSocket's bufferedAmount is always undefined. Either iOS or Android, after connecting to URL and sending data, socket.bufferedAmount is undefined.
Version
0.66.2
Output of npx react-native info
System:
OS: macOS 12.1
CPU: (8) x64 Intel(R) Core(TM) i5-8279U CPU @ 2.40GHz
Memory: 613.17 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 15.3.0 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 7.19.1 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.11.2 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 15.4, macOS 12.3, tvOS 15.4, watchOS 8.5
Android SDK:
System Images: android-26 | Google APIs Intel x86 Atom, android-26 | Google Play Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: 2021.1 AI-211.7628.21.2111.8309675
Xcode: 13.3.1/13E500a - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_265 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.66.2 => 0.66.2
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
- Initialize a
WebSocket, then check bufferedAmount is undefined.
- Send some data, then check
bufferedAmount is undefined.
Snack, code example, screenshot, or link to a repository
const sock = new WebSocket(url);
console.log(sock.bufferedAmount); // it's undefined
const data = new Uint8Array(8192); // (1<<13) = 8kBytes
sock.send(data);
console.log(sock.bufferedAmount); // it's also undefined
Description
WebSocket's
bufferedAmountis always undefined. Either iOS or Android, after connecting to URL and sending data,socket.bufferedAmountis undefined.Version
0.66.2
Output of
npx react-native infoSystem:
OS: macOS 12.1
CPU: (8) x64 Intel(R) Core(TM) i5-8279U CPU @ 2.40GHz
Memory: 613.17 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 15.3.0 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 7.19.1 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.11.2 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 15.4, macOS 12.3, tvOS 15.4, watchOS 8.5
Android SDK:
System Images: android-26 | Google APIs Intel x86 Atom, android-26 | Google Play Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: 2021.1 AI-211.7628.21.2111.8309675
Xcode: 13.3.1/13E500a - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_265 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.66.2 => 0.66.2
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
WebSocket, then checkbufferedAmountis undefined.bufferedAmountis undefined.Snack, code example, screenshot, or link to a repository