add socket packet format and send heart beat packet.