Stellar structure

In an optically thick stellar interior, photons are repeatedly absorbed, emitted, or scattered in many directions. What produces a net outward radiative energy flow?