basic server class and a echo example