Socket wrapper for statsc