add handle detect result,and construct the package to send to the client;fix some bug