TCPConnection & BoshConnection

Issue #53 wontfix
Soo Han created an issue

I think Connection abstract class can be turned into full-fledged Connection mechanism, with TLS, socket timeout , response Timeout, Connection Events (Connected, Disconnected) and Connection Event Listeners.

And Make TCPConnection and BoshConnection be implementing ConnectionStrategy and how to handle connectivity as it is doing currently to a degree.

As a ConnectionStrategy interface will give rise to extend the API for WebsocketStrategy

Comments (5)

  1. Christian Schudt repo owner

    I've added WebSocket support with dd6f39a0c9c73f68428e0922c66a1f5ddb096456. Without any additional code changes to the core. Please describe what you want to achieve with an additional ConnectionStrategy interface.

    From my point of view one abstract Connection class is sufficient, there's no need to introduce an interface.

    With regards to ConnectionEvent: It might make sense, but for now I prefer at XmppSession, because it has the abilitiy to switch the connection method ("strategy") after/during reconnection.

  2. Soo Han reporter

    Thanks for clearing it up. I was only reading through TCPConnection when I wrote this comment. Looking through code it was difficult for me to see the boundary between XmppClient, XmppStreamReader, XmppStreamWriter and TCPConnection. I see that this is only for TCPConnection and other Connection is rather straight forward. To answer your question, I was mearly trying to improve the readability of the TCPConnection. There are no functional impact that I see with your code base. Feel free to close this issue

  3. Soo Han reporter

    excellent implementation for Websocket. I was think the internal status would have to go through XmppSession.Status but you've shown me a way bypass the statemachine. Thanks!

  4. Christian Schudt repo owner

    I think the current abstract Connection is fine. TCP, BOSH and WebSockets have been implemented with that.

  5. Log in to comment