fix semantic bugs in StreamingSocket
ported streaming socket to ES5
Merge pull request #6 from Raynos/es5-streaming-socket

Fix streaming socket & port to es5