Socket wrapper library