Problem
- Product Name: VisiBroker for C
- Product Version: 5.2.1 & above
- Product Component: ORB
- Platform/OS Version: All
How to get the timestamp of when the request is received and by a VBC 5.2.1 Server and when the reply is sent?
Resolution
Please do the following in SampleServerInterceptor.h in examples/vbe/pi/client_server directory of VisiBroker installation
1. #include time.h
2. Please replace the code in receive_request method with the following code:
time_tt = time(0);
cout << "=======>Time Stamp : " << asctime(localtime(&t)) <<"=====> SampleServerInterceptor id " << ri->request_id() << " receive_request => " << ri->operation() << ": Object ID = " << ri->object_id() << ", Adapter ID = " << ri->adapter_id() << endl;
3. Please replace the code in send_reply method with the following code:
time_tt = time(0);
cout << "=============>Time Stamp: " << asctime(localtime(&t)) << "=====> SampleServerInterceptor id " << ri->request_id() << " send_reply => " << ri->operation() << endl;
If you wish to include time stamp on send_exception you can make similar changes to that method also to print out the time stamp.
Please follow the compilation instructions in the example and start the Server using the resulting SampleServerLoader DLL as shown in the client_server_cpp.html in example directory.
#Security
#timestamp
#PortableInterceptor
#VisiBroker




