event.cpp

来自「一款开源的soap库」· C++ 代码 · 共 35 行

CPP
35
字号
/*	event.cpp	C++-style client	Events based on asynchronous one-way SOAP messaging using HTTP	keep-alive for persistent connections. C++ style with Proxy object.	Copyright (C) 2000-2002 Robert A. van Engelen. All Rights Reserved.	Compile:	soapcpp2 event.h	c++ -o event event.cpp stdsoap2.cpp soapC.cpp soapClient.cpp	Run (first start the event handler on localhost port 18000):	event*/#include "soapEventProxy.h"#include "Event.nsmap"int main(){ Event e;  soap_set_omode(e.soap, SOAP_IO_KEEPALIVE);  if (e.handle(EVENT_A))    soap_print_fault(e.soap, stderr);  if (e.handle(EVENT_B))    soap_print_fault(e.soap, stderr);  /* connection should not be kept alive after the last call: be nice to the server and tell it now */  soap_clr_omode(e.soap, SOAP_IO_KEEPALIVE);  if (e.handle(EVENT_C))   soap_print_fault(e.soap, stderr);  return 0;}

⌨️ 快捷键说明

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