Use streams for socket read/write