I'm want to logout some clients from server, and I'm looking for a stanza or extension (if available) that will tell the client to logout.
I know I can kill the connection from the server side, but most clients have an auto-reconnect feature.
NOTE: I need to be able to use this with standard xmpp clients like pidgin, adium,etc..
Thanks
You can simply send a packet to close stream:
</stream:stream>
Reference: http://xmpp.org/rfcs/rfc6120.html#streams-close
Related
I would like to know if is it possible to get XMPP messages sent by mobile client applications in my PHP Back end server?
The PHP Back end server will process the messages (JSON request) and send responses back to the client mobile apps. There will be 5 million client application users sending messages to server simultaneously.
Well you can use XMPP but definitely for that, you will need alot of changes.
Your mobile clients will send data in XMPP packets (message or iq) and you will have to handle those stanzas and parse them to get the data (which can be JSON).
So, Yes you can use XMPP but you need to have such skills (both on client side and on server side).
Socket.IO, I'm either over-thinking it, or I just don't understand how it works. Probably the latter.
Can someone please help me out.
I am seeing examples all over the place that talk about emitting , back to the sender, broadcasting to all clients, or broadcasting to all clients but the sender.
What is not clear is where this is all happening, server or client, or both?
My main questions are:
Does a server have to relay everything to all clients?
Can a client
send a message directly to all other clients (without the server
having to relay it)
Can a client send a message directly to specific
client?
I would be very very grateful for any help in clarifying this to me.
The server does not have to relay everything to the clients. That is where you have the option to emit back to the sender, all clients, or all clients but the sender.
No, the client always sends a message to the server.
No, same reason as above -- you could send a message from original client, to server, to intended specific client, but you would have to hop through the server.
is it possible to listen / monitor messages send from a user to an another on Openfire Server using Smack API
No, that would be a privacy violation, because it would mean that a third party is able to intercept and read messages between two JIDs.
Of course, you can modify any XMPP server to relay certain XMPP stanzas to a third party. But since there is no XEP that defines a API for such a mechanism, it's also not available in Smack.
We have a system that can send emails using TLS. However, we only want to send full email w/attachments if the destination supports TLS. IF it does not support TLS, we send a different message without attachments.
We used to just try sending with TLS and waiting for the receiver to "fail" back to us, then send the backup message. Recently, we switched to relaying through Frontbridge for all of our outgoing messages. However, Frontbridge will send a message using TLS if it can, or without if it can't. We've lost the ability to customize our message based on TLS support.
The question is this: in a .NET C# web app, how can I tell if a destination supports TLS BEFORE sending anything? That way we can customize the message BEFORE relaying it through Frontbridge.
I need to be able to do this programmatically, but I don't want to have to add a whole library to our solution (like Minimalistic Telnet), because we don't need full telnet functionality... I just need to ping to server and ask it what it supports!
Can that be done simply using the System.Net.Sockets stuff??
Thanks,
Kevin
Yes, you need to write part of SMTP protocol.
For explicit TLS mode: You connect, receive and send data, then send STARTTLS command and see if the response is 220. Then you should close connection.
For implicit TLS you would need to emulate or use an SSL/TLS client: send initial request, check the response and disconnect.
As you don't want to use external libraries, I can't recommend you our SecureBlackbox, whose SMTP component lets you do what you need in a dozen of lines of code.
I would like to initiate a Chat between two users A and B from my web application. So I create an XMPP Message using Smack Client API or directly from an OpenFire Plugin:
Send a Message by Smack from A to B
Send a Message by Smack from Server to B with replyTo A
XEP-0033 allow "replyTo address" supported by OpenFire but not suported by IM Clients.
It seems "from" can't be overrided by a client or an OpenFire plugin. I also think GTalk will not accept an xmpp message from userA#gmail.com to userB#gmail.com by ServerToServer protocol.
Is there an other way to do this ? I want my web application to forge a message from UserA to UserB. But this webapp is not A or B.
Best Regards,
Jp
Any XMPP server should ignore the from address in a stanza and stamp the one that it get's from the connection into the stanza it sends on. This is a specific feature of XMPP compliant servers and is used to stop address spoofing and spam etc. You'd probably have to edit the source of a server and change it's behaviour. This is dangerous though and I wouldn't reccomend it if you'll be federating with other servers.
J