[IPhone advanced] 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:

<message type="chat" from="kang@server.com" to="test@server.com">    <body>helloWord</body></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 iOS chat client program based on XMPP. First, we need the XMPP server. Here, I will use this machine as the server, first download the ejabberd server from the XMPP 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:


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

Click <virtual host>, and there is a <dpc1338a> below.


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.


Okay. After the server is installed, We need to download a client to chat. Here are some client tools.

Bytes
Framework.

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.