refactor iosocket -> stream_socket