client and server gateway