int main() { try { win.Read(NULL, 0); WugSSH ircsox; ircsox.BindProxy("wuggl.es", 22); ircsox.Bind("chat.freenode.net", 6667); CommandReader ui; Monitor iomon; iomon.Activate(); CommandReader *cr = (CommandReader *) iomon.AddDataSource(ui); WugSSH *wssh = (WugSSH *) iomon.ConnectDataSocket(ircsox); cr->ircsock = wssh; while (true) iomon.ServiceRoutine(Interval(1000, 0)); } catch (IOException &ioe) { wout.Write(String::ToString(ioe.errorcode) + "\n" + ioe.description + "\n"); } return 0; }
int main() { TimerDerp timertest; Monitor mon; mon.Activate(); mon.AddDataSource(timertest); while (true) { mon.ServiceRoutine(Interval(2, 0)); } }