Jump to content

Problem with ServerStateChecker func.


Recommended Posts

I designed and coded my login window, but now I have problem with check channel status.

I want to use ServerStateChecker, but this function doesnt work like I thought.



...

import ServerStateChecker

....

class LoginWindow(ui.ScriptWindow):

        def Open...

                ServerStateChecker.Create(self)

                #alotofcode

                ServerStateChecker.Initialize();
                ServerStateChecker.AddChannel(1, server_ip, 31000) # channel_id, ip, port
                ServerStateChecker.AddChannel(2, server_ip, 41000)
                ServerStateChecker.AddChannel(3, server_ip, 51000)
                ServerStateChecker.AddChannel(4, server_ip, 61000)
                ServerStateChecker.Request()

        def NotifyChannelState(self, channelID, state):
                print "Channel index: %d, state: %d" % (channelID, state)

        def OnUpdate(self):
                ServerStateChecker.Update()

I use compiled bin in debug mode, and i saw only one text in console from NotifyChannelState "Channel index: 1, state: 1" = state NORM - its ok, becouse this channel is online.

And here is my problem! Why funct NotifyChannelState works only one time for channel 1? Maybe I use this wrong.

Anybody can help me?

 

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.