Adding threading to client for messaging