implement socket manager