listen thread for client
client write thread