Preface
Openfire + spark + smack can be considered for Java instant messaging solutions. Of course there are other options.
Openfire is an instant messaging server version based on the jabber protocol (XMPP). We recommend that you use version 3.8.1, which is the latest version and can find the downloaded source code online.
The instant messaging client can use spark2.6.3, which is currently the latest versi
the Android client through the server.
Server:
The server uses Openfire as the server, allowing multiple clients to log on concurrently to a server. The server authenticates the connection of each client and creates a session for the authenticated client, communication between the client and the server is performed in the context of the session.
Android Server Design
The androidpn server is implemented in Java. Based on the openfire open source proj
The XMPP (Extensible Message Processing Field Protocol) is an Extensible Markup Language (XML) protocol that is used for instant messaging (IM) and on-line on-site detection. It facilitates quasi-instant operation between servers. This agreement may eventually allow Internet users to send instant messages to anyone else on the internet, even if their operating system and browsers are different.
In fact, XMPP
XMPP (Scalable Message Processing site protocol) is based on the Extensible Markup Language (XML) protocol, which is used for instant messaging (IM) and online on-site detection. It facilitates quasi-real-time operations between servers. This protocol may eventually allow Internet users to send instant messages to anyone else on the Internet, even if the operating system is different from the browser.
The predecessor of
XMPP (Scalable Message Processing site protocol) is based on the Extensible Markup Language (XML) protocol, which is used for instant messaging (IM) and online on-site detection. It facilitates quasi-real-time operations between servers. This protocol may eventually allow Internet users to send instant messages to anyone else on the Internet, even if the operating system is different from the browser.
The predecessor of
server officially provided by Google. Due to the domestic network environment, this service is often unavailable.
The XMPP protocol established on TCP not only provides the persistent connection function, but also enables duplex communication between servers and clients, and does not depend on the system version or google server, provides a better solution.
2. XMPP protocol
XMPP (Scalable Message Processing site protocol) is based on the Extensible Markup Language (XML) protocol, which is used for instant messaging (IM) and online field probing. It promotes quasi-real-time operations between servers. This protocol may eventually allow Internet users to send instant messages to others on the Internet, even if their operating systems are different from those in browsers.
The predecessor of
XMPP (Extensible Message Processing Field Protocol) is an Extensible Markup Language (XML)-based protocol that is used for instant messaging (IM) and on-line on-site probing. It facilitates the quasi-immediate operation between servers. The agreement may finally allow Internet users to send instant messages to anyone else on the internet, even if their operating systems and browsers are different.XMPP's predecessor was Jabber, an open source form of o
XMPP (Extensible Message Processing Field Protocol) is an Extensible Markup Language (XML)-based protocol that is used for instant messaging (IM) and on-line on-site probing. It facilitates the quasi-immediate operation between servers. The agreement may finally allow Internet users to send instant messages to anyone else on the internet, even if their operating systems and browsers are different.XMPP's predecessor was Jabber, an open source form of o
XMPP (Extensible Message Processing Field Protocol) is an Extensible Markup Language (XML)-based protocol that is used for instant messaging (IM) and on-line on-site probing. It facilitates the quasi-immediate operation between servers. The agreement may finally allow Internet users to send instant messages to anyone else on the internet, even if their operating systems and browsers are different.XMPP's predecessor was Jabber, an open source form of o
Recently, due to development needs, we need to integrate instant messaging tools on Oa. we originally planned to use RTX or MSN, but there was no relevant source code. It was difficult to integrate with specific services and finally we gave up. I am also looking for open-source products, but I cannot find them.. NET development has a server and a client, C ++ and Java, but unfortunately they only do. net.
I found a lot of information on the Internet
also keepsOpenFire,hit,Sparksand theXiffProject. plugin |NBSP; Readme |NBSP; license |NBSP; update log |NBSP; nightly build |NBSP; source code OpenFire 4.0.2OpenFire (formerly Wildfire) is a cross-platform, real-time collaboration server based on the XMPP (Jabber) protocol. Read the name change . Choose your platform: Readme files and licenses | Update Log | build every night 2.7.7 sparksCross-platform real-time collabo
small data transmission rate is higher, because there is no need to send and receive data confirmation, so UDP real-time better.Know the difference between TCP and UDP, it is not difficult to understand why the use of TCP transmission protocol MSN than UDP transmission file slow, but can not say that QQ communication is not safe, because the programmer can manually verify the data sent and received by UDP, For example, the sender of each packet number and then by the receiver to verify AH what,
Parsing XMPP protocol analysis and application XMPP is an XML-based protocol that inherits the flexible development in the XML environment. Therefore, XMPP-based applications are highly scalable. After the extension, XMPP can send extended information to meet user requirements, and create application processes such as
Smack allows developers to set a large number of attributes for each message. attributes can also contain Java objects.
3) open source code based on the Apache license, which means you can put Smack into your own commercial software.
Iv. Composition of the Smack Library
The Smack library can be embedded in any Java application. The Smack library consists of several JAR files, which are flexible.
1. smack
XMPP (II)-introduction and personal experience of the android client (like QQ) based on asmack + openfire, xmppasmack
The first article on XMPP-after the openfire was built, I have been catching up with this android client based on asmack + openfire which I want to introduce in this article, which has paid a lot of effort, A lot of students are waiting anxiously (narcissistic), so they are in a hurry. Now w
Summary
In the XMPP communication process, Asmack provides the packet component is iq,message,presence three kinds: IQ is used for query messages for message passing presence for state interaction they are all packet subclasses, The essence is the XML format used to encapsulate messages into responses for data exchange, which has good scalability.
Brief introduction
We take the Open source project Androidpn as an example:
ANDROIDPN (Android push N
small data transmission rate is higher, because there is no need to send and receive data confirmation, so UDP real-time better.Know the difference between TCP and UDP, it is not difficult to understand why the use of TCP transmission protocol MSN than UDP transmission file slow, but can not say that QQ communication is not safe, because the programmer can manually verify the data sent and received by UDP, For example, the sender of each packet number and then by the receiver to verify AH what,
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.