⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testclient.cpp

📁 UAV 自动驾驶的
💻 CPP
字号:
/** *  $Id: testclient.cpp,v 2.0 2002/09/22 02:07:32 tramm Exp $ */#include "Observer.h"#include <iostream>using namespace std;void handler(	uint32_t		type,	const void *		buf,	size_t			buflen,	void *			user_data){	cout << "Received type " << type << " of len " << buflen << endl;}int main(){	Observer::Server c;	cout << "Connecting" << endl;	c.connect( "localhost", 2002 );	c.subscribe( 1024, handler, 0 );	cout << "Asking for 1024" << endl;	c.sendme( 1024 );	c.send( 1024, 0, 0 );	while(1)	{		c.poll( -1 );		c.handle();	}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -