add some functions and fix bugs:can't recive all data when the data are sent by serval times