now clients detect eof properly and close
added test package for demo implementations