Posts

Showing posts with the label ejabberd

Ejabberd Client Guide

In this post, we are going to look at a quick guide to build a client for Ejabberd Server. I have used Smack API . Other available APIs can be found here . Here you have links for web based, python, c++ etc client etc. Please note this post just gives you pointers to move ahead in your development. Before we start with the example, let us first understand what XMPP protocol is. XMPP stands for e X tended M essaging and P resence P rotocol. It is a open standard, decentralized, secure extensible, flexible and diverse protocol for messaging and presence. XMPP Message looks like this: <message to= 'romeo@example.net' from= 'juliet@example.com/balcony' type= 'chat' xml:lang= 'en' > <body> Wherefore art thou, Romeo? </body> </message> It is based on XML. It enables near real time exchange of structured yet extensible data between any two or more network entities. Originally named Jabber, it was ...

Writing your own ejabberd Module

Coming soon: What is ejabberd? What is erlang? Installation details. I will start with writing the ejabberd module first. Once you have done all the installations: sudo make sudo make install sudo ejabberdctl start sudo ejabberdctl stop You can check the status using: sudo ejabberdctl status You can locate logs at: (With default installation) /var/log/ejabberd All config related changes will be mainly done at: /etc/ejabberd/ejabberd.yml You will need a basic understanding of erlang. You can take a short crash course at: http://www.erlang.org/course/course.html This is a good reference. Go to your ejabberd-15.07/src directory. This is where you will write the hook for your ejabberd server. Create a file, say mod_changeBody.erl. Your module name and file name should be same. Add the following basic contents into your erl file: -module(mod_changeBody). -behavior(gen_mod). -include("ejabberd.hrl"). -include("logger.hrl"). -expo...