Added out-of-band method to force stream_type to "generic_socket".

Fixes a [React](https://github.com/reactphp/react) framework test.
Changed StaticString to String.