Add pid data for event strcut
Add global var for knowing all pieces are retrieve or not
Implmenting event handler. Need to fix the bug of peer selection which invoke from event and the bug of infinite loop which iterate event_list