Hi epep,

you can always test your code against a Lightstreamer version available from our site (for example, you can install a free Moderato version or a Vivace demo). After installation, please follow the instructions on how to deploy the StockList Demo Adapter.

That said, your modifications look very good, just a couple of observations:
  1. Replacing the "raise IOError()" in the _handle_stream method is not a good idea, because a server error response while connecting is a symptom that something is not working properly, as you can read from Paragraph 4.1 of the Network Protocol Tutorial
  2. It is necessary to remove the following line:

    before invoking reconnect(), otherwise you'll run against a runtime error: it is a bug that I'm going to fix in our example


Please let us know about your progresses.

Thanks and Regards,
Gianluca