Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

143
Visualizações
Do any public XMPP servers use websockets?

I would like to use some simple Javascript code I have written, with any public XMPP server using WebSockets. I have seen multiple examples of this and wrote my code accordingly. I am not using any javascript or XMPP libraries and would prefer to keep it that way.

I am opening my websocket with socket = new WebSocket("ws://xmpp.xyz"); and have tried over a dozen servers. My application does not need encryption and therefore doesn't use wss://.

The error returned in chrome's console is "WebSocket connection to 'ws://xmpp.xyz/' failed:". I have been able to successfully open a websocket to the external echo server echo.websocket.events/.ws. Using chrome's network inspect, I see the socket open successfully and my stanza's being sent and received correctly with callback functions.

I now wonder if all the examples I had read, were for servers being hosted in a company network, and none of the public XMPP servers will accept my websocket connection request. If they can accept my request is there something else I need in my url? Based on some of the examples, I have tried a few ports like 80, 5280 and some additions to my url (such as "ws://jabber.org:80/ws/").

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Yes, at least one public XMPP server, Tigase.im, does support websockets.

After some light digging though the strophe.js code, I found a second parameter that specified the service as a string. Opening the websocket in pure javascript with the port provided by Wojtek and the protocol string set to xmpp worked.

socket = new WebSocket("wss://tigase.im:5291/","xmpp");
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda