finish a demo chat server