server & client af, TODO: implement protocol