refactoring

use session to protect inner packet

use binary value instead of char array for key list