Hi there,

I'm having a couple of trouble while trying to do the following:

Server application based on NetChannel example.

My server will have a console that allows user to type commands, like: enable, disable and other.

Enable -> Puts the server online;
Disable -> Puts the server offline;

For this I have a while loop that waits for user to insert a command, and that works just fine.

My problem is: when a client connects I need to have another loop to perform something similar to:

(line 88)
while(true) {
CL_System::keep_alive();
CL_System::sleep(100);
}

That will allow clanlib to receive client signals like connect and disconnect.

Since these two loops need to work at the same time, I put the console loop into a thread (line 196), but that doesn't seem to solve my problem. Although the users are getting connected, and disconnected if I "disable" the server while they are connected.

I'm not getting the messages "user connected" (line 182), "user disconnected" (line 191) when they occur.

It seems a scope problem, but I'm not being able to fix it.

Any help on this will be very appreciated.

PS1: I'm working with ClanLib 0.8.1
PS2:
server.cpp http://pastebin.com/f339b5bd6
server.hpp http://pastebin.com/d410f27ce