support multi-leaders
update some functions to support multi-leaders
update socket.c
support multi-leaders
update utils.h