basic implementation of decoder api

implementation of the decoder api within the socket api callbacks. it
allocate a stream struct, and allocate a separate packet for each
incoming chunk of data.