basic framework for chat server