XMPP / Jabber: For custom messages I need to modify the client or the server?
I am writing an IM and I want to implement some features that are not in the standard, I want some custom features.
I am wondering if for example I could use Google's XMPP service(Google Talk) and make a custom IM Client that implements the default features to be able to talk with the server and may be there is a way to add some custom tags in the XML that Google's Server will work with and send the message to my other Client that can interpret this XML and display and do the right things?
Or do I have to implement this features on the server? Openfire for example has support for plugins, you can extend it with plugins but I would really prefer to avoid making my own server and use Google accounts and server instead. I am just a student and I don't have the resources to maintain a server by my own.
Also, I don't really understand for what "Jabber Component Protocol" is used. From what I've read I understand that it could solve my problem but it has to be on the server. It is not in the XMPP Server but it has to work also as a Server and connect with the XMPP Server.
I don't think I could use "Jabber Component Protocol" with Google's XMPP Server or could I?
If I understand your question correctly then you only want to add some extra payloads to your messages that must be interpreted by the receiving client only. So you need the XMPP server only as a router from client A to client B. This will work in combination with the Google Talk server and any other server as well. This extensibility is one of the base features of XMPP.
The Openfire plugins and the component protocol is for other use cases.
Here is an example how to add your custom payloads:
So something like:
<message to="user@server.com">
<mytag xmlns="mycompany.com/mynamespace"/>
</message>
or
<message to="user@server.com">
<mytag xmlns="urn:xmpp:mynamespace:v1"/>
</message>
链接地址: http://www.djcxy.com/p/16822.html