examples/client: remove unneeded decl
socket: make callbacks typesafe

This removes a lot of compiler warnings.