Added emit statusCode, so a stream implementation can know the status code of the current stream.