Implement handle_recv, required in debug mode

Fixes #572
Use a real signature for handle_revc
Merge pull request #575 from amarandon/master

Implement handle_recv, required in debug mode