void TestPubSub() { IEventPtr events = IEventPtr(new TEvent()); IIOCPEventedPtr iocp_evented = IIOCPEventedPtr(new TIOCPEvented(events)); for(;;) { events->WaitOne(); iocp_evented->completion_port().Flush(); } }
void TestEcho() { IEventPtr events = IEventPtr(new TEvent()); IIOCPEventedPtr iocp_evented = IIOCPEventedPtr(new TIOCPEvented(events)); TEchoTest echo_test(iocp_evented, "127.0.0.1", 333, 128); for(;;) { events->WaitOne(); iocp_evented->completion_port().Flush(); } }