add_callbacks function in p2p; fix #186
Merge pull request #202 from dionyziz/add_callback

[WIP] add_callbacks function in p2p; fix #186