If you can get the packet listener to work email me but
here is the final code for CFMX!
This creates the object one time and keeps the connection
with zeus.jabber.org:5222
<cfif isdefined(“session.XMPPConnection”)>
<cfif session.XMPPConnection.isConnected()>
<cfset session.XMPPConnection = createObject(“java”, “org.jivesoftware.smack.XMPPConnection”).init(“jabber.org”)>
<cfset session.XMPPConnection.login(“danpxxx”, “ziloxxx”)>
<cfset session.XMPPConnection = createObject(“java”, “org.jivesoftware.smack.XMPPConnection”).init(“jabber.org”)>
<cfset session.XMPPConnection.login(“danpxxx”, “ziloxxxx”)>
This does not create the chat side just the connection object. Check NETSTAT in DOS
You can turn on the dedugger like so
<cfif isdefined(“form.client”)>
<cfset session.chat = session.XMPPConnection.createChat("#form.client#")>
<cfif isdefined(“form.message”)>
<cfset chat.sendMessage("#form.message#")>
I could not get this to work
<cfset session.XMPPConnection.addMessageListener(org_jivesoftware_smack_PacketListener , org_jivesoftware_smack_filter_PacketFilter)>
It returned null or empty string which might be the
right result.
Message was edited by: danp5648