add chat server example code