Keeping up connection

Hi,

I am about to write a simple application functioning as a bot.

I have a question about keeping the connection to the server alive. I have managed to connect and login, but I get disconnected again immediatly.

What is there to do to keep the connection adhere and await chat requests?

Thx

zulp

Hi zulp,

Is your program exiting because the connection is closing or is the connection closing because your program is exiting? I would suspect it’s probably the latter. If your bot isn’t going to have a UI you’ll need to look into using some sort of loop to prevent your program from exiting and the connection from closing.

Hope that helps,

Ryan

oh of course… that’s it

how stupid of me… thank you