Source Location: /sonic.stream.inc
the two main stream classes
the thread class is a fork wrapper which also sets the internal pid numbers for the base class
the stream class is the main stream plugin wrapper with utility and helper functions it extends the thread class which provides the sonic_thread_run() function which creates the forked sonic_stream_thread_main() fork wrapper alternative to standard sonic_stream_main().
sonic_stream_main() is provided by the actual plugin which uses said main two classes.