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?