You've already forked mariadb-columnstore-engine
							
							
				mirror of
				https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
				synced 2025-10-30 07:25:34 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			39 lines
		
	
	
		
			645 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			39 lines
		
	
	
		
			645 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #include <iostream>
 | |
| using namespace std;
 | |
| 
 | |
| #include "messagequeue.h"
 | |
| using namespace messageqcpp;
 | |
| 
 | |
| #include "configcpp.h"
 | |
| using namespace config;
 | |
| 
 | |
| int main(int argc, char** argv)
 | |
| {
 | |
| 	Config* cf = Config::makeConfig("./Columnstore.xml");
 | |
| 	MessageQueueServer mqs("server1", cf);
 | |
| 
 | |
| 	cout << "server ready..." << endl;
 | |
| 
 | |
| 	IOSocket ios;
 | |
| 	ByteStream ibs;
 | |
| 	ByteStream obs;
 | |
| 	uint32_t qb = 0;
 | |
| 	while (1)
 | |
| 	{
 | |
| 		ios = mqs.accept();
 | |
| 		ibs = ios.read();
 | |
| 		while (ibs.length() > 0)
 | |
| 		{
 | |
| 			cout << "read " << ibs.length() << " bytes from " << ios << endl;
 | |
| 			obs.restart();
 | |
| 			obs << qb;
 | |
| 			ios.write(obs);
 | |
| 			ibs = ios.read();
 | |
| 		}
 | |
| 		ios.close();
 | |
| 	}
 | |
| 
 | |
| 	return 0;
 | |
| }
 | |
| 
 |