Add slave support

Hi, here are a few modifications to add redis slave server support.