openframeworks / openframeworks/openFrameworks
ofxTCPClient getNumReceivedBytes error
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 9
Description
The method getNumReceivedBytes() of ofxTCPClient is supposed to return the byte count in the last received message, but instead is always returning the value 0 for the receive() method. That's not the case of the receiveRaw() and receiveRawBytes() methods.
The problem is that the variable used to mantain the last byte count after executing a receive method (messageBytes) is correctly updated in the receiveRaw() and receiveRawBytes() method but not in the receive().
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate ofxTCPClient and compare how receive(), receiveRaw(), and receiveRawBytes() update messageBytes. Start by tracing receive() and verify that getNumReceivedBytes() reports the last received byte count consistently across all three methods. Done means receive() no longer leaves the reported count at zero when bytes were received.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100