socket wrapper
parameterized dont trust smart ptr