A traveling-wave electroabsorption modulator (TW-EAM) is used to realize three simultaneous functions: demultiplexing, detection, and pulse generation. These coexisting functions are achieved by utilizing microwave harmonic frequencies and independent wavelengths in the TW-EAM. When combined with a phase-locked-loop, these functions enable simultaneous optical demultiplexing, electrical clock recovery, and optical clock generation at line-rates of 40 and 160-Gb/s.