use weak_ptr when new message arrives in examples/server, LOG socket error when HandleEvents