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

📄 perf_server_reqreply.cc

📁 C++的CORBA程序源代码,isporb.1.1.1.tar.gz
💻 CC
字号:
// perf_oneway_ser.cc// The server for the TestOneway example.// The executable file generated from this code should be registered // (under the name 'TestReqReply') using the 'putit' command.#include <stream.h>#include <stdlib.h>#include "perf_server_t.hh"int main() {  /* create a TestReqReply object, myTest  - using the implementation class   * TestReqReply_template.    * Because the TIE approach is being used, we need to create a TIE object:   */  TestReqReply_ptr myTest =    new TIE_TestReqReply(TestReqReply_templated)(new TestReqReply_templated());      /* dkv: let's work via IORs saved in file but not via repository */    char TestReqReply_IOR_file[512];    char *base_dir = getenv ("ISPORB_BASE_DIR");    FILE *TestReqReply_f;        if (base_dir == NULL) {      printf (" Set ISPORB_BASE_DIR variable first (see \"INSTALL\").\n");      exit (0);    }        strcpy (TestReqReply_IOR_file, base_dir);    strcat (TestReqReply_IOR_file, "/src/examples/perf/orbix20/IORs/TestReqReply");        if ((TestReqReply_f = fopen (TestReqReply_IOR_file, "w")) == NULL) {      printf ("Can not open file %s for writing\n", TestReqReply_IOR_file);      exit (0);    }    CORBA2::String_var TestReqReply_IOR = CORBA::Orbix.object_to_string (myTest);    fputs (TestReqReply_IOR, TestReqReply_f);    fclose (TestReqReply_f);    /* end of added by dkv */  try {    CORBA::Environment bugFixEnv;    // tell Orbix that we have completed the server's initialisation:    CORBA::Orbix.impl_is_ready("TestReqReply", bugFixEnv);  }    catch (CORBA::SystemException &sysEx) {    cerr << "Unexpected system exception" << endl;    cerr << &sysEx;    exit(1);  } catch(...) {    // an error occured calling impl_is_ready() - output the error.    cout << "Unexpected exception" << endl;    exit(1);  }  // impl_is_ready() returns only when Orbix times-out an idle server  // (or an error occurs).  cout << "server exiting" << endl;  return 0;}

⌨️ 快捷键说明

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