parc-ccnx-archive / libccnx-transport-rta Goto Github PK
View Code? Open in Web Editor NEWCCNx Transport RTA Stack
License: Other
CCNx Transport RTA Stack
License: Other
Create a real README.md
In connector_Forwarder_Metis.c, the function _readPacket
is responsible for consuming the available socket buffer to read 0 or more CCNx packets. The first if
statement reads the header and then, optionally, the second statement continues and reads the body. The problem lies in the if (returnCode == ReturnCode_Finished)
portion of the second statement.
static ReadReturnCode
_readPacket(FwdMetisState *fwd_state)
{
ReadReturnCode returnCode = ReadReturnCode_PartialRead;
// are we still reading the header?
if (fwd_state->nextMessage.remainingReadLength > 0) {
returnCode = _readPacketHeader(fwd_state);
}
// After reading the header, it may be possible to read the body too
if (returnCode == ReadReturnCode_Finished && fwd_state->nextMessage.remainingReadLength == 0) {
returnCode = _readPacketBody(fwd_state);
}
return returnCode;
}
Let's say we have a partial body read as a result of one call of this function from the parcEvent handler. On the next invocation of this function, due to data being available on the socket fd, we see the problem. fwd_state->nextMessage.remainingReadLength
is 0 since the header has already been read and added to the packet buffer. The first if
statement is not executed. This leaves the returnCode
variable with a value of ReadReturnCode_PartialRead
. Now, the second if
statement will never be executed to complete the read of the packet body. We end up in an endless loop of parcEvent notifications (since the socket fd is available for reading), but no actual reads of the socket ever take place.
Let Libccnx-transport move around, use rpath
Integrate the documentation to the cmake build
The correct namespace is "ccnxTransport," not "ccnx" or "transport."
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.