Read socket response

Use callback + generics (temporary solution, i'm looking for better)