// // Created by pansen on 2017/8/4. // #ifndef RTSPNATIVECODEC_REMOTEFUNC_H #define RTSPNATIVECODEC_REMOTEFUNC_H #include #include #include "RemoteMethod.proto.h" //::capnp::Capability::Server template class RemoteServer{ public: // RemoteServer(std::string host, int port, capnp::EzRpcServer rpcServer) : rpcServer(rpcServer) { // this->rpcServer(kj::heap(),host, port); // //.rpcServer(kj::heap(),host, port); // }; RemoteServer(std::string host,int port):host(host),port(port){}; ~RemoteServer(){}; bool start(); void stop(); bool running; private: std::string host; int port; static void *rServer_thd(void *arg); pthread_t server_thd; pthread_mutex_t mutexSerevr; }; #endif //RTSPNATIVECODEC_REMOTEFUNC_H