integrate client and server