adds socket connection wrapper