Use threading for client and server applications