tigase / Martin

(M) Martin - XMPP client library for Swift
Other
69 stars 27 forks source link

BOSH support (XEP 0124 and XEP 0206) #27

Closed ghost closed 6 months ago

ghost commented 6 months ago

Hi!

How could BOSH support be added to the library?

Thanks!

hantu85 commented 6 months ago

It would need to be implemented and it should be possible to set it as a Connector implementation in ConnectionConfiguration.

ghost commented 6 months ago

Thanks for your reply @hantu85.

If I make a bosh connection to a prosody server with token authentication in the url "url/http-bind?token=token" and in the server response xml I receive the parameters "sid" and "authid", can you guide me to implement that response in "ConnectionConfiguration" to make use of the rest of your library?

Thanks!

hantu85 commented 6 months ago

BOSH is not just a question of implementing response. You actually need to implement the whole connector with all code required to make HTTP request and reading responses. Then you would need to pass that implementation to ConnectionConfiguration. Additionally, as you are using some kind of token based authentication, it would require additional modifications to the logic of session authentication.

ghost commented 6 months ago

I see... did your library have this implementation in the past?

hantu85 commented 6 months ago

No. Martin never had support for BOSH.

ghost commented 6 months ago

Ok, thanks @hantu85