zephyr.js
zephyr.js copied to clipboard
[net] Improve the information for socket properties
Description
Please Improve the information for socket properties.
// Socket properties
Number bufferSize; // Size of read buffer
Number bytesRead; // Total bytes read for the socket
Number bytesWritten; // Total bytes written for the socket
Those are undefined.
Test Code
Simple test:
console.log("socket.bufferSize:", typeof sock.bufferSize, sock.bufferSize);
console.log("socket.bytesRead:", typeof sock.bytesRead, sock.bytesRead);
console.log("socket.bytesWritten:", typeof sock.bytesWritten, sock.bytesWritten);
Steps to Reproduction
Actual Result
Expected Result
Be defined.
Test Builds
Branch | Commit Id | Target Device | Test Date | Result |
---|---|---|---|---|
master | 8a5bafc5 | Arduino 101 | May 18, 2017 | Fail |
Additional Information
This is really an enhancement, part of the Node.js API we haven't supported. This would require extra bookkeeping and I don't think it's of great value to the app developer in this environment, so I'm also lowering the priority.