added transport functions to stream_engine. Moved read and write back to stream_engine_t. Noticed that member functions had been moved to tcp - this is not strictly correct, as ipc uses the same mechanism.