Exemplo n.º 1
0
// Worker process for connection listening
UINT __cdecl Listener::ListenerWorker(LPVOID p_param)
{
  // See _beginthread call for parameter definition
	Listener* listener = reinterpret_cast<Listener *>(p_param); 

	SetThreadName("HTTPListener");

  listener->Listen();
	return 0;
}
Exemplo n.º 2
0
int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);
    Listener *Josh = new Listener();
    Josh->Listen("irc.freenode.net",6667,"","","","");
    QTextStream io(stdin);
    while(1){
        Josh->sendMessage(io.readLine(),"bot-battle");
        io.flush();
    }
    return a.exec();
}