function client_thread_emtry added