Gtalk jingle (2)-in-band and out-of-band im

Source: Internet
Author: User

When talking about the relayserver statement in the libjingle code, a client can only communicate with one peer. If Gtalk directly uses this code without modification, when relay server is required, how does one chat with multiple people?

 

In fact, this libjingle is only responsible for voice chat, file transmission, these additional features, Gtalk features are quite simple (simple), and does not support voice chat among others. In terms of XMPP, it is out of band data. These data volumes are usually large and cannot be embedded in the signaling and affect the signaling. Therefore, a dedicated connection is usually established.

 

In our basic text chat, because the text is short, it is directly embedded in the signaling channel of the IM client and the IM server. That is, the IM Client is sent to the IM server, and the IM server is then sent to the peer IM client. There is no need to create additional dedicated text chat connections (so what nat traversal, big holes, and so on ). In terms of XMPP, it is in band data.

 

RFC 3920 XMPP-core provides a simplified client-server session example:

(Juliet/Juliet sends a sentence to the server, indicating that it is intended for Romeo/Romeo; the server sends a sentence to Julia, Which is returned by Romeo .)

A basic "session ":

C: <? XML version = '1. 0'?>
<Stream: Stream
To = 'example. com'
Xmlns = 'jabber: client'
Xmlns: stream = 'HTTP: // etherx.jabber.org/streams'
Version = '1. 0'>
S: <? XML version = '1. 0'?>
<Stream: Stream
From = 'example. com'
Id = 'someid'
Xmlns = 'jabber: client'
Xmlns: stream = 'HTTP: // etherx.jabber.org/streams'
Version = '1. 0'>
... Encryption, authentication, and resource binding...
C: <message from = 'juliet @ example.com'
To = 'Romeo @ example.net'
XML: lang = 'en'>
C: <body> art thou not Romeo, and a Montgomery? </Body>
C: </message>
S: <message from = 'Romeo @ example.net'
To = 'juliet @ example.com'
XML: lang = 'en'>
S: <body> neither, fair saint, if either thee dislike. </body>
S: </message>
C: </stream: stream>
S: </stream: stream>

 

 

The XMPP Core Protocol specifies in-band signaling, in-band data (Message), and out-of-band data communication is implemented by some XMPP extension protocols (such as jingle.

 

(In the telecom field, there are both in-band and out-of-band signals. The signals transmitted over the same channel as the voice are called in-band signals, instead, it refers to the out-of-band signaling that is transmitted in the same channel as the voice. It is compared with the Voice/Data Channel. In im, it is in-band and out-of-band mode relative to the signaling channel ).

 

In fact, this text transfer method in IM is the same as that in mobile communication. The text is also embedded in the signaling protocol (MAP) medium (limit on the number of characters in each short message), complete transmission in the signaling (Control) plane.

 

-Qianli

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.