add http streaming and use socket