summaryrefslogtreecommitdiff
path: root/src/oscpack/TODO
blob: 309ae685b864c536a197e878e645fdd7929babed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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();
        };

    - provide some kind of automatic endianness configuration (hopefully there
        are gcc symbols for this)

    - 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.