File indexing completed on 2025-01-19 06:55:04
0001 #include <iostream> 0002 0003 using namespace std; 0004 0005 #include "kmuddyvars.h" 0006 0007 0008 //**************************************************************** 0009 // Program to test kmuddyvars.h functionality 0010 //**************************************************************** 0011 0012 int main() 0013 { 0014 char mybuffer[256]; 0015 0016 initVariableSocket(); 0017 0018 cout << "Initialising IP server\n"; 0019 cout.flush(); 0020 0021 initIPPort(4132); 0022 0023 cout << "Done. Receving event notification\n"; 0024 cout.flush(); 0025 0026 for (int count = 0; count < 5; count++) 0027 { 0028 getEvent(mybuffer,sizeof(mybuffer)); 0029 0030 cout << "Event received: '" << mybuffer << "'\n"; 0031 cout << "Sending reply\n"; 0032 cout.flush(); 0033 0034 sendCommand("bounce"); 0035 } // endfor more bounces to do 0036 0037 closeVariableSocket(); 0038 0039 } // main