Implemented select(2) on the slave side.