worker socket handler