Implementation of some functions in ChatServer Class