TPS interview question

OS process communication mechanism: socket vs pipes