ap and client example (tutorial 1 and tutorial 2)