本文整理汇总了C++中XmlRpcServer类的典型用法代码示例。如果您正苦于以下问题:C++ XmlRpcServer类的具体用法?C++ XmlRpcServer怎么用?C++ XmlRpcServer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了XmlRpcServer类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: RequestHandler
/**************************************
* RequestHandler
* Callback
**************************************/
void XmlRpcServer::RequestHandler(void *par,TSession *ses, abyss_bool *ret)
{
//Obtenemos el servidor
XmlRpcServer *serv = (XmlRpcServer *)par;
//Procesamos la llamada
*ret = serv->DispatchRequest(ses);
}
开发者ID:chenxiuheng,项目名称:mcumediaserver,代码行数:12,代码来源:xmlrpcserver.cpp
示例2: QObject
Server::Server( const QString &address, quint16 port, QObject *parent )
: QObject( parent )
{
XmlRpcServer *srv = new XmlRpcServer;
if ( srv->listen( QHostAddress( address ), port ) ) {
srv->registerSlot( this, SLOT( testFunc(QVariant) ) );
}
}
开发者ID:MHarris021,项目名称:sleepyhead,代码行数:8,代码来源:server.cpp
示例3: runServer
void runServer()
{
int port = 7776;
XmlRpc::setVerbosity(5);
s.bindAndListen(port);
s.enableIntrospection(true);
s.work(-1.0);
}
开发者ID:RyokoAkizuki,项目名称:SWCUServerPlugin,代码行数:8,代码来源:RPCServer.cpp
示例4: _tmain
int _tmain(int argc, _TCHAR* argv[])
{
DWORD dwXmlRpcThreadID;
PROCESS_INFORMATION pi;
HANDLE hXMLRpcClientThread;
bool ThreadCreated=false;
LogLevel=1;
Log(1,L"ITEScreenWatch V 0.1");
MyGetIpAdress(); // read IP into g_pLocalIP
InitScreenContent();
CreateProcess(L"\\Program Files\\Intermec\\ITE\\intermte.exe", L"", NULL, NULL, FALSE, 0, NULL, NULL, NULL, &pi);
Sleep(10000);
hWndITEWindow = FindWindow(_T("IntermTE"), _T("ITE"));
if (hWndITEWindow==NULL)
{
Log(1,L"FindWindows ITE failes");
}
else
{
hXMLRpcClientThread=CreateThread(NULL, 0, XMLRpcClientThread, (VOID *)0, 0,&dwXmlRpcThreadID);
if (hXMLRpcClientThread == NULL)
{
Log(1,L"CreateThread failed");
}
else
{
Log(1,L"CreateThread OK");
ThreadCreated=true;
}
}
Log(1,L"Waiting for TE exit");
do{
WaitForSingleObject(pi.hProcess,INFINITE);
}while((FindWindow(_T("IntermTE"), _T("ITE")))!=NULL);
Log(1,L"ITE Exit");
if (ThreadCreated)
{
s.exit();
s.shutdown();
}
//Sleep(2000);
TerminateThread(hXMLRpcClientThread,1);
//Log(L"Wait Thread end");
//WaitForSingleObject(hXMLRpcClientThread,INFINITE);
Sleep(1000);
closeMsgQueue(g_hMsgQueue);
Log(1,L"Program Exit");
return 0;
}
开发者ID:hjgode,项目名称:ITE_xml_rpc,代码行数:58,代码来源:ITEScreenWatch.cpp
示例5: main
int main(int argc, char* argv[])
{
XmlRpc::setVerbosity(5);
// Create the server socket on the specified port
s.bindAndListen(0);
// Enable introspection
s.enableIntrospection(true);
// Wait for requests indefinitely
s.work(-1.0);
return 0;
}
开发者ID:Aand1,项目名称:ROSCH,代码行数:15,代码来源:port_zero_server.cpp
示例6: main
int main(int argc, char* argv[])
{
cout << "=========================================================" << endl;
cout << "=== CHAT SERVER XMLRPC ===" << endl;
cout << "=== Prof. Me. Petrônio Cândido ===" << endl;
cout << "=== Sistemas Distribuídos, FACIT 2012 ===" << endl;
cout << "=========================================================" << endl;
int port = 8000;
//XmlRpc::setVerbosity(5);
s.bindAndListen(port);
s.enableIntrospection(true);
s.work(-1.0);
/*
ChatServer server;
char *usr1 = "teste1";
char *usr2 = "teste2";
server.Registrar(usr1);
server.Registrar(usr2);
server.Enviar(usr2, usr1, "Teste1");
server.Enviar(usr2, usr1, "Teste2");
server.Enviar(usr2, usr1, "Teste3");
mensagem m1 = server.Receber(usr1);
cout << m1.corpo << endl;
string s;
cin >> s;
*/
//return 0;
}
开发者ID:petroniocandido,项目名称:SD,代码行数:48,代码来源:main.cpp
示例7: main
int main(int argc, char* argv[])
{
std::vector<std::string> lst;
ImageSearchServer imageSearch(&s);
//std::string datasetPath = "/Users/jquequezana/workspace/files/flickr";
//std::string dataExtension = ".rgb";
std::string datasetPath = "/Users/jquequezana/workspace/files/facedb2";
std::string dataExtension = ".sfi.pca";
imageSearch.setConfiguration(datasetPath, dataExtension);
//imageSearch.getRandomSet(datasetPath);
imageSearch.query("01.jpg", 20 );
/*
datasetPath = "C:/xampp/htdocs/cbir/Caltech-256";
dataExtension = ".jpg.oRGBHistograms";
imageSearch.setConfiguration(datasetPath, dataExtension);
//imageSearch.getRandomSet(datasetPath);
imageSearch.query("024_0056.jpg", 10 );*/
/* datasetPath = "C:/xampp/htdocs/cbir/PIBAP";
dataExtension = ".jpg.eGeometricFeatures2";
imageSearch.setConfiguration(datasetPath, dataExtension);
imageSearch.getRandomSet(datasetPath);
imageSearch.query("1_2_1.jpg", 10 );*/
int port = 9090;
XmlRpc::setVerbosity(5);
// Create the server socket on the specified port
s.bindAndListen(port);
// Enable introspection
s.enableIntrospection(true);
// Wait for requests indefinitely
s.work(-1.0);
return 0;
}
开发者ID:jquequezana,项目名称:satree,代码行数:47,代码来源:main.cpp
示例8: main
int main(int argc, char* argv[])
{
if (argc != 2) {
std::cerr << "Usage: Validator port\n";
return -1;
}
int port = atoi(argv[1]);
XmlRpc::setVerbosity(5);
// Create the server socket on the specified port
s.bindAndListen(port);
// Wait for requests indefinitely
s.work(-1.0);
return 0;
}
开发者ID:BackupTheBerlios,项目名称:cbilplugin-svn,代码行数:18,代码来源:Validator.cpp
示例9: RPCListener
static DWORD RPCListener(LPVOID lpData)
{
int port=12345;
// XmlRpc::setVerbosity(5);
// Create the server socket on the specified port
s.bindAndListen(port);
// Enable introspection
s.enableIntrospection(true);
// Wait for requests indefinitely
s.work(-1.0);
Log(1,L"XMLRPC Server exit");
return 1;
}
开发者ID:hjgode,项目名称:ITE_xml_rpc,代码行数:18,代码来源:ITEScreenWatch.cpp
示例10: main
int main(int argc, char* argv[])
{
if (argc != 2) {
std::cerr << "Usage: HelloServer serverPort\n";
return -1;
}
int port = atoi(argv[1]);
XmlRpc::setVerbosity(5);
// Create the server socket on the specified port
s.bindAndListen(port, "");
// Enable introspection
s.enableIntrospection(true);
// Wait for requests indefinitely
s.work(-1.0);
return 0;
}
开发者ID:Quiplit,项目名称:sems,代码行数:21,代码来源:HelloServer.cpp
示例11: execute
void execute(XmlRpcValue& params, XmlRpcValue& result)
{
std::ifstream infile("pngnow.png", std::ios::binary);
if (infile.fail())
infile.open("../pngnow.png", std::ios::binary);
if (infile.fail())
result = "Could not open file pngnow.png";
else {
XmlRpcValue::BinaryData& data = result;
int n = 0;
for (;; ++n) {
char c = infile.get();
if (infile.eof()) break;
data.push_back(c);
}
s.exit();
std::cerr << "Read " << n << " bytes from pngnow.png\n";
}
}
开发者ID:nega0,项目名称:xmlrpcpp,代码行数:20,代码来源:TestBase64Server.cpp
示例12: xml_rpc_server_listen
void xml_rpc_server_listen(void)
{
s.bindAndListen(mmaster.port());
s.work(-1.0);
}
开发者ID:viniciusah,项目名称:ros_mmaster,代码行数:5,代码来源:mmaster.cpp
示例13: main
int main(int argc, char **argv)
{
ros::init(argc, argv, "mmaster", ros::init_options::AnonymousName);
if (!mmaster.readAddressMaster())
{
cout << "There is no ROS_MASTER environment variable. Exiting ..." << endl;
exit(1);
}
mmaster.getIPAddress();
srand(time(NULL));
mmaster.setPort((rand() % 64512) + 1024); // choose a random a port between 1024 and 65536 // ports below 1024 requires root privileges and
// max port number is 65536
// XmlRpc::setVerbosity(3);
thread_exit = false;
boost::thread xml_rpc_server_thread(xml_rpc_server_listen);
// Set false on first call to test later if I choose a port not used
mmaster.alreadyAddMyAddress(false);
boost::thread update_mmaster_addresses_thread(update_mmaster_addresses);
#ifdef DEBUG
cout << "main: Vou entrar no laço de leitura do teclado" << endl;
#endif
string keyboard_input;
while(true)
{
cin >> keyboard_input;
if (keyboard_input == "exit")
{
cout << "main: Finishing this master" << endl;
break;
}
if (keyboard_input == "print")
{
mmaster.printServerInfo();
}
}
thread_exit = true;
// Shutdown XML RPC Server
s.shutdown();
ros::NodeHandle node_handle;
string mmaster_addresses;
ROS_INFO("Consulting param /mmaster_addresses");
// Get updated list from parameter server
node_handle.getParam("/mmaster_addresses", mmaster_addresses);
// TODO
// send a notification to others masters to notify that i am leaving
mmaster_addresses = mmaster.removeMyAddress(mmaster_addresses);
if (mmaster_addresses != "")
{
// Remove my address from parameter server
node_handle.setParam("/mmaster_addresses", mmaster_addresses);
}
else
// I am the last server, remove the param
node_handle.deleteParam("/mmaster_addresses");
return 0;
}
开发者ID:viniciusah,项目名称:ros_mmaster,代码行数:76,代码来源:mmaster.cpp
注:本文中的XmlRpcServer类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论