1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- #include "ivservice.h"
- #include "ivservice_impl.h"
- namespace iv {
- namespace service {
- Server::Server(const char *strservicename, ServiceProc xProc)
- {
- Server_impl * pserver = new Server_impl(strservicename,xProc);
- mpimpl = (void *)pserver;
- }
- Server::~Server()
- {
- Server_impl * pserver = (Server_impl *)mpimpl;
- delete pserver;
- }
- Client::Client(const char *strservicename)
- {
- Client_impl * pclient = new Client_impl(strservicename);
- mpimpl = pclient;
- }
- Client::~Client()
- {
- Client_impl * pclient = (Client_impl * )mpimpl;
- delete pclient;
- }
- Client::ServiceResRes Client::SendRequest(std::shared_ptr<char> pstr_request,const int nreqsize, std::shared_ptr<char> &pstr_response, int & nressize,const int timeout)
- {
- Client_impl * pclient = (Client_impl * )mpimpl;
- return pclient->SendRequest(pstr_request,nreqsize,pstr_response,nressize,timeout);
- }
- int Client::AsyncSendRequest(std::shared_ptr<char> pstr_request, const int nreqsize, ServiceAsycnProc xProc, const int timeout)
- {
- Client_impl * pclient = (Client_impl *)mpimpl;
- return pclient->AsyncSendRequest(pstr_request,nreqsize,xProc,timeout);
- }
- }
- }
|