Focus on Instant Messaging

Source: Internet
Author: User

First, instant Messaging

Instant Messaging (Instant Messaging) is currently the most popular mode of communication on the Internet, and a variety of instant messaging software is emerging, providing services to provide businesses with more and more rich communication services.


XMPP (Xml,messages,presence,protocol) is an Extensible Markup Language (XML)-based protocol that can be used for instant messaging (IM). -Extensible Message Processing site Protocol

XMPP Benefits:
1. Open
The XMPP protocol is developed by the JSF Open source community organization and is not owned by any organization or individual, fundamentally guaranteeing its openness.
2. Standard
The Internet Engineering Working Group has formally identified XMPP in 2002 as an accredited real-time communication and presence technology.
3. Distributed Network Architecture
Although the XMPP protocol is based on the Client/server architecture, the XMPP protocol itself does not have such limitations, the network architecture and e-mail is very similar, but does not combine any specific network architecture, the scope of application is very wide.

The 4.XMOO protocol has good extensibility
The application based on XML has good semantic integrity and extensibility

5.XMPP has very good elasticity.
In addition to the applications available for Instant messaging, XMPP can be used in network management, content feeds, collaboration tools, file sharing, gaming, remote system monitoring, and more.

6. Security

XMPP uses the TLS (Trsport Layer security protocol as the communication channel encryption method in Client--to--server communication and server-to_serve communication to ensure the security of communication.


XMPP for Instant Messaging

Principle
Implementation of instant copper requires at least one server-side, two clients.
Below we are prepared for the desired environment:
1, XMPP server 2, XMPP client (secondary debugging)

XMPP Environment Setup

There are several ancillary tools required to build the XMPP environment:

1, XAMPP
XAMPP (Apache +mysql +php +perl) is a powerful build XAMPP software station inheritance Package

Many people have realized from their own experience that installing Apache servers is not an easy thing to do. It's even harder if you want to add MySQL, PHP, and Perl. XAMPP is a version of Apache that is easy to install and contains MySQL, PHP, and Perl. XAMPP is really easy to install and use: Just download, unzip, start.

There are several ancillary tools required to build the XMPP environment:
2, OpenFire ()
OpenFire is developed in Java, and the open source real-time collaboration (RTC) server is based on the XMPP (jabber) protocol. OpenFire is easy to install and use, and is managed with the Web. A single server can support tens of thousands of concurrent users.

The OpenFire service is written in the Java language, and your computer must have a Java operating environment. Install JKD after successful run OpenFire

You need to create a database for use at this time

Build the database end, need to import the table, at this time to go to the OpenFire file to get the required files, the location is as follows

XMPP Client Environment Setup

Setting up XMPP clients using spake, secondary debugging: One design standard for XMPP systems is the need to support simple clients. In fact, the XMPP system architecture has only a few limitations on clients. The features that an XMPP client must support are:

1. Communicating with the XMPP server via TCP sockets;

2. Parsing well-organized XML

Information packets;

3. Understanding Message data types

The environment configuration is complete.

Add XMPP to your project

1. Create the project

2. Import the XMPP framework

3, the introduction of XMPP need to rely on the library libxml Libresolv

4. Set the path/UER/INCLUDE/LIBXML2

Login

1. Login, register as a module, use storyboard to build the framework

Implementing a single case

On the login page

Logged in. m

Registration page Code

Focus on Instant Messaging

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.