This a demo for xmpp,user can rigister a new user,add user to roster,and send message.But you need configure xmpp server(ejabberd) on centos firstly