openframeworks / openframeworks/openFrameworks

ofxTCPClient getNumReceivedBytes error

Open
#2,598 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bitesize bug core prelim-analysis section-internals
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.