separate socket and wechat process functions.