XMPP-based IOS chat client (XMPP Server Architecture)

Source: Internet
Author: User

I recently read about the XMPP framework. Taking text chat as an example, the message to be sent is:

[HTML] View
Plaincopy

  1. < Message   Type = "Chat"   From = Kang@server.com"   To = Test@server.com" >
  2. < Body > Helloword </ Body >
  3. </Message>

In the base, from is the message sent from the user, to is the message sent to the user, XMPP users are in the form of mailbox. Body is the message text we send.

Now, let's develop an XMPP-based IOS chat client.ProgramFirst, we need the XMPP server. Here, I will use the local machine as the server. First, download it from the XMPP server.EjabberdThis server, ejabberd supports Linux
/Mac OS X/Solaris/windows, so any operating system can be used as our chat server. Okay. After the download is complete, you can install it step by step. here we need to pay attention to it.


Here, our server is dpc1338a (generally the machine name, which can be changed by default). The user names of each machine are different. The server domain name here is the machine name, remember this.

The next step is to set the administrator password. Remember the password. Otherwise, we cannot log on to the Administrator page.

Okay. After the installation is complete, start as follows:

Click admin interface and we will be asked to enter the user name and password:


Here, the user name is an administrator name when we installed it. We can combine the Administrator name with our server. Here I am admin @ dpc1338a, and each machine is different, do not copy it. In this way, you cannot log on. The password is the password set during installation.

After successful logon, the following page is displayed:


What we need to explain here is <Access Control List> Here we set the Administrator. We can create other administrators here. This is not our focus, but our focus is <Virtual Host>

Click <Virtual Host>, There is a <Dpc1338a>, Also click


Here is a <User>, We need to create several users for data interaction.

I created Kang @ dpc1338a, test @ dpc1338a, ABC @ dpc1338a, and chat with these users later.


after the server is installed, we need to download a client to chat. Here are some client tools

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.