Giter Site home page Giter Site logo

hxmpp's Introduction

HXMPP

Haxe XMPP library

The Extensible Messaging and Presence Protocol is an open technology for real-time communication, which powers a wide range of applications including instant messaging, presence, multi-party chat, voice and video calls, collaboration, lightweight middleware, content syndication, and generalized routing of XML data. The XMPP protocols are free, open, public, and easily understandable.

  • RFC3920 XMPP Core
  • RFC3921 XMPP Instant Messaging and Presence
  • RFC5122 Internationalized Resource Identifiers (IRIs) and Uniform Resource Identifiers (URIs) for XMPP.
  • RFC7395 Subprotocol for WebSocket

Install

haxelib install hxmpp
# or
haxelib git https://github.com/tong/hxmpp

test haxelib

hxmpp's People

Contributors

aszlig avatar tong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hxmpp's Issues

Flash xmlns error

Since haxe 2.06 flash is unable to set xml element namespace.
Current workaround is:

#if flash
x.set( '_xmlns_', s );
#else
x.set( 'xmlns', s );
#end

.. but this still breaks unit tests.

XEP-0384: OMEMO Encryption

Can you add the XEP-0384: OMEMO Encryption support?

And XEP-0454: OMEMO Media sharing:

Diff Tool:

Trouble when sending messages from component

Hey,

I have a test component, which echos messages: http://pastebin.com/FtxA3y0h
Now I am registering this component with ejabberd:

{5290, ejabberd_service, [{hosts, ["gamecomp.sam"],                                                                                      
                             [{password, "12345"}]}]},

The component starts fine:

App.hx:41: Connecting to jabber server
SocketConnection.hx:122: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAa
<?xml version="1.0" encoding="UTF-8"?><stream:stream xmlns="jabber:component:accept" xmlns:stream="http://etherx.jabber.org/streams" to="gamecomp.Sam" xmlns:xml="http://www.w3.org/XML/1998/namespace">SocketConnection.hx:148: read
<stream:stream from="gamecomp.Sam" id="881956887" xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:component:accept"/>
App.hx:28: XMPP stream opened
<handshake>2a82832f93d10f3f84a542687717da6b08a89702</handshake>
<handshake/>
App.hx:38: Server component connected.

but when it sends a message, I get this error:

App.hx:19: Received message from b1@sam at resource: 18342472381390760561603157
<message to="b1@sam/18342472381390760561603157" type="chat">
    <body>Hello darling aka b1</body>
</message>
<message from="b1@sam/18342472381390760561603157" type="error">
    <body>Hello darling aka b1</body>
    <error code="400" type="modify">
        <bad-request xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
    </error>
</message>

Is the component somehow identifiying itself incorrectly?
Thanks!
Nathan

Component crashing on sending message

Hey,

I have a little example component, which sends a message with:

stream.sendMessage(recv, message, xmpp.MessageType.chat, "", messageFrom);

Doing so results in this crash:

App.hx:38: Connecting to jabber server
SocketConnection.hx:122: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAa
<?xml version="1.0" encoding="UTF-8"?><stream:stream xmlns="jabber:component:accept" xmlns:stream="http://etherx.jabber.org/streams" to="gamecomp.iSam.iSam" xmlns:xml="http://www.w3.org/XML/1998/namespace">SocketConnection.hx:148: read
<stream:stream from="gamecomp.iSam.iSam" id="4021023253" xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:component:accept"/>
App.hx:24: XMPP stream opened
<handshake>2401a4b0d403d541348884036aaaa21ef6b3286a</handshake>
<handshake/>
App.hx:34: Server component connected.
<message id="purpleb512a588" from="b1@isam/23367093081390926140258123" type="chat" to="gamecomp.iSam">
    <body>Hallo</body>
    <active xmlns="http://jabber.org/protocol/chatstates"/>
</message>
App.hx:44: Received message from b1@isam at resource: 23367093081390926140258123
<message from="gamecomp.iSam" type="chat" to="b1@isam/23367093081390926140258123">
    <body>wy13:ServerMessagey7:Message:1y26:Hello%20darling%20aka%20b1</body>
    <thread></thread>
</message>
Called from App::main::App.hx::39
Called from jabber.component.Stream::open::jabber/component/Stream.hx::103
Called from jabber.SocketConnection::connect::jabber/SocketConnection.hx::131
Called from jabber.component.Stream::handleConnect::jabber/component/Stream.hx::117
Called from jabber.SocketConnection::read::jabber/SocketConnection.hx::178
Called from jabber.Stream::handleData::jabber/Stream.hx::394
Called from jabber.Stream::handleString::jabber/Stream.hx::479
Called from jabber.Stream::handleXml::jabber/Stream.hx::492
Called from xmpp.Packet::parse::xmpp/Packet.hx::87
Called from xmpp.Message::parse::xmpp/Message.hx::68
Critical Error: Null Object Reference

Looking at Message.hx:68, it seems that it tries to get a xml child of the "thread" node, which does not exist.
If I should debug in some other way, I am happy to do so!

Component sending iq stanze when user gets online and receives an error

Hey,

I have a simple server component, where nothing but "onMessage" is handled yet. When a client goes online, the following debug output is generated:

<iq id="purple94907582" from="b1@isam/13429848401391438282957155" type="get" to="gamecomp.isam">
    <query xmlns="http://jabber.org/protocol/disco#info"/>
</iq>
<iq id="purple94907582" from="gamecomp.iSam.iSam" type="result" to="b1@isam/13429848401391438282957155">
    <query xmlns="http://jabber.org/protocol/disco#info">
        <identity category="component" type="generic" name="gamecomp.iSam"/>
        <feature var="http://jabber.org/protocol/disco#info"/>
        <feature var="http://jabber.org/protocol/disco#items"/>
    </query>
</iq>
<iq id="purple94907582" from="b1@isam/13429848401391438282957155" type="error" to="gamecomp.iSam.iSam">
    <error type="modify" code="400">
        <bad-request xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
    </error>
    <query xmlns="http://jabber.org/protocol/disco#info">
        <identity category="component" type="generic" name="gamecomp.iSam"/>
        <feature var="http://jabber.org/protocol/disco#info"/>
        <feature var="http://jabber.org/protocol/disco#items"/>
    </query>
</iq>

So the client sends an "get" stanze and the component responded. Than the client responses with an error...
I do not understand what this error means. What is happening and do I need to implement something to change this?

PubSub

How do I create and publish to a pubsub node?

Cannot get component example to work

I am trying out the component example, with neko as target and of course the login data changed. I am using openfire for the server.

When I try the application, I get:

App.hx:31: Connecting to jabber server
Called from xmpp.disco.Items::$statics line 1
Called from App::main line 32
Called from jabber.component.Stream::open line 103
Called from jabber.SocketConnection::connect line 140
Called from jabber.component.Stream::handleConnect line 115
Called from jabber.Stream::sendData line 304
Called from jabber.XMPPDebug::print line 131
Called from xmpp.XMLBeautify::it line 36
Called from Xml::parse line 119
Uncaught exception - xml.c(80) : Xml parse error : Unexpected end at line 0 : ...<eof>

An example component written in jave works with the server.

SSL encryption

TLS/SSL encryption should be support by all targets and the default settings if not explicit turned off.

XEPs and RFCs support page with version

Tags

You should make git tags of major releases, like the most recent.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.