strophe

Save received files from xmpp Strophe si-filetransfer

半世苍凉 提交于 2019-12-01 21:54:25
I am implementing file transfer in my web application using strophe.si-filetransfer.js plugin. I am able to receive file details within an iq stanza. My question is, How can I extract file data from an iq stanza and download it? The link I referred to work around: https://github.com/strophe/strophejs-plugins/tree/master/ibb Thanks On the receiver side, you need to collect file info on fileHandler function, then grab all data chuncks on ibbHandler (e.g. using an array) and finally you have to join all file parts (data chuncks) and restore the original file. In the example below (adapted from

XMPP file transfer using Strophe library

浪尽此生 提交于 2019-12-01 19:34:57
Can anyone let me know the implementation of file transfer in XMPP using strophe library I would recommand to use the XEP-0065: SOCKS5 Bytestreams that you will need to code by yourself, I'm afraid... theres a strophe si-filetransfer plugin available. You will have to study the code and add the handler along the lines of: connection.si_filetransfer.(addhandler); Then use it with : connection.si_filetransfer.send(to, sid, filename, size, mime, cb); I tried it out earlier, but was unsuccessful as it killed my strophe connection for some reason. Maybe you have better luck =) you can use si

When to disconnect bosh connection establish from app server to use prebinding in strophe?

旧巷老猫 提交于 2019-12-01 09:18:35
This question is Extension of my previous question on this SO question " How to connect XMPP bosh server using java smack library? " I am using Java as server side language. I have successfully implement xmpp BOSH connection using smach-jbosh thanks to @Deuteu for helping me to achieve this, so far I have modify jbosh's BOSHClient.java file and added two getter method for extracting RID and SID. Now I have RID and SID on my app server (I am using Apache Tomcat). I need to pass this credential to Strophe (web client) so that it can attach to connection. Here I have some doubt. When to

Get SID & RID using strophe.js

谁都会走 提交于 2019-12-01 09:17:34
How can I get the SID & RID when connecting to a XMPP server using strophejs ? I am using Ejabbered as the XMPP server. Here is my code $(document).bind('connect', function (ev, data) { var conn = new Strophe.Connection('http://localhost:5280/http-bind'); conn.connect(data.jid, data.password, function (status) { if (status === Strophe.Status.CONNECTED) { $(document).trigger('connected'); } else if (status === Strophe.Status.DISCONNECTED) { $(document).trigger('disconnected'); } }); Gab.connection = conn; }); $(document).bind('connected', function () { --------------------------------- --------

Get SID & RID using strophe.js

自闭症网瘾萝莉.ら 提交于 2019-12-01 07:42:39
问题 How can I get the SID & RID when connecting to a XMPP server using strophejs ? I am using Ejabbered as the XMPP server. Here is my code $(document).bind('connect', function (ev, data) { var conn = new Strophe.Connection('http://localhost:5280/http-bind'); conn.connect(data.jid, data.password, function (status) { if (status === Strophe.Status.CONNECTED) { $(document).trigger('connected'); } else if (status === Strophe.Status.DISCONNECTED) { $(document).trigger('disconnected'); } }); Gab

When to disconnect bosh connection establish from app server to use prebinding in strophe?

大憨熊 提交于 2019-12-01 05:40:00
问题 This question is Extension of my previous question on this SO question "How to connect XMPP bosh server using java smack library?" I am using Java as server side language. I have successfully implement xmpp BOSH connection using smach-jbosh thanks to @Deuteu for helping me to achieve this, so far I have modify jbosh's BOSHClient.java file and added two getter method for extracting RID and SID. Now I have RID and SID on my app server (I am using Apache Tomcat). I need to pass this credential

What do I need for integrating XMPP into Rails?

核能气质少年 提交于 2019-11-30 14:52:16
Here's what I have so far. XMPP Server - Ejabberd or Vine XMPP Library in Rails - Blather XMPP Library on Client - Strophe.js Is this what I need to integrate chat into my rails app? EDIT: from the creator of Vine. "It's probably safer to use ejabberd, since its a more full-featured server than vines." I would have add a comment but unfortunately I don't have enough reputation yet. If you want to do your chat client side, Strophe is recommended. If you want to store some conversations, you'll do it server-side, but not 'rails server'-side, you should do it 'xmpp server'-side : Ejabberd should

Strophe register plugin

夙愿已清 提交于 2019-11-28 11:50:17
I am trying to use this https://github.com/strophe/strophejs-plugins/tree/master/register for my small app http://rghost.ru/7qjXH2cTZ and a always get Strophe.status = 1? what does it mean? It should be 11 for enter into If for register new user You can verify your code against my example on Plunker: http://plnkr.co/edit/F8cbsBZQUPiZ0W1v0O89 Here is the code part related to user registration: function register() { var registerCallback = function (status) { if (status === Strophe.Status.REGISTER) { log("registerCallback: REGISTER"); connection.register.fields.username = $('#reg_name').get(0)

Complete example of Strophe.js file transfer [closed]

。_饼干妹妹 提交于 2019-11-27 21:44:53
I'm developing a chat web client (XMPP based) using Strophe.js. On server side I have an Openfire server. I'm looking for a complete (and working) example of file transfer ( xep-0096 ) using Strophe.js. I know there is a plugin, named si-filetransfer , which should help in implementing this feature but documentation is missing. So it is not easy to understand how it works. Here on StackOverflow I found only some incomplete post relating the matter, as for example: Save received files from xmpp Strophe si-filetransfer Also on the web I didn't find any complete solution to my needs. If there is

architecture to Facebook-chat from a webpage, (XMPP? Strophe? Punjab?)

本小妞迷上赌 提交于 2019-11-27 15:11:26
问题 I would like to implement FB-chat inside a webpage . I looked around in Facebook API, i found out that chat is allowed only using XMPP. First I tried to connect to FB-chat using Pidgin and it worked fine. My conclusion was that FB-chat server is acting as the XMPP server. Is this true? I read about XMPP, it seems that an open TCP connection should be established between the client and the server to exchange the XML stanzas which is not possible from a website (over JavaScript and without