nodescore/oscpack/TODO

53 lines
2.3 KiB
Plaintext
Raw Permalink Normal View History

TODO:
- consider adding the local endpoint name to PacketListener::PacketReceived() params
- consider adding ListenerThread class to support old seperate thread listener functionality, something like:
class UdpSocketListenerThread{
public:
UdpSocketListenerThread( UdpSocket& socket, Listener *listener );
UdpSocketListenerThread( UdpSocketReceiveMultiplexer *mux );
~UdpSocketListenerThread();
void Run();
void Stop();
};
- work out a way to make the parsing classes totally safe. at a minimum this
means adding functions to test for invalid float/doublevalues,
making sure the iterators never pass the end of the message, ...
(passing end of message can happen if:
- too many args in type tags
a. typetags overflow message size
b. args fulfilling typetags overflow message size
- strings too long or not terminated correctly
- blobs too long or not terminated correctly
if the message was fully checked during construction, the end() iterator
could be moved back until only arguments which fit withing size() may
be interated (this could be none). A flag could be set to indicate that
something was wrong.
- other packet badness could include:
- time tags too far into the future (the scheduler should deal with
that i guess).
- message address patterns which aren't correctly terminated
- improve the ability to parse messages without tags (SC uses methods which
get the data and advance the iterator in one step.)
- Check* could be modified to do this - ie if typetags are not present
it could check that reading the field won't escape the message size
and return the data, or return false if some consistency
constraint is violated.
(or alternately drop support for messages without type tags)
- add a method to discard an inprogress message if it gets half
constructed and the buffer is full in OutboundPacket
- write a stress testing app which can send garbage packets to try to flush out other bugs in the parsing code.