Socket wrapper implemented.