Closed
Bug 286071
Opened 20 years ago
Closed 9 years ago
AsyncWait of input stream of the socket (open as buffered) ignores requestedCount argument.
Categories
(Core :: Networking, enhancement)
Core
Networking
Tracking
()
RESOLVED
INVALID
People
(Reporter: bambas, Unassigned)
Details
(Keywords: helpwanted)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050309 Firefox/1.0+ Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050309 Firefox/1.0+ I want to wait for some specific amount of data incoming to the accepted TCP connection without reading them before. I use requestedCount parameter of AsyncWait() method, but it is ignored and callback is given everytime even if there is no new data in the stream. Reproducible: Always Steps to Reproduce: 1. Accept new socket transport with @mozilla.org/network/server-socket;1. 2. Open input stream as buffered (one 65536B segment). 3. Use AsyncWait() on the input stream to wait for incoming data into the stream or to notice it has been closed. Actual Results: If I call AsyncWait() on the inputstream from OnInputStreamReady() callback and I do not read the data from the stream I get OnInputStreamReady() over and over again altought I use the requestedCount parameter of AsyncWait(). I wait for at least one more byte (currently available + 1). To get the available value I use Available() method of the stream. Expected Results: Expected behavior is I get OnInputStreamReady() callback only when some more data arives to the stream.
Comment 1•20 years ago
|
||
The reqeustedCount feature is not implemented yet. I debated over this when adding this API. Other folks insisted that this API should exist even if not implemented :-( For now, I recommend working around the problem by creating a buffer. I won't have any time to work on this for a while.
Updated•19 years ago
|
Assignee: darin → nobody
QA Contact: benc → networking
Target Milestone: Future → ---
Comment 2•9 years ago
|
||
requested is clear that it is just a guideline, not a promise
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•