Changes variable from 'socket' to 'stream' in json transmitter