begin socket work