add client
add kqueue and thread implementation