MCPcopy Create free account
hub / github.com/acl-dev/acl / rpc_client

Class rpc_client

lib_acl_cpp/src/ipc/rpc.cpp:208–246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

206// ����ʵ�������߳�������
207
208class rpc_client : public ipc_client
209{
210public:
211 rpc_client(acl_int64 magic) : ipc_client(magic) {}
212 ~rpc_client(void) {}
213
214protected:
215 /**
216 * @override
217 * ������ӿڣ����յ���Ϣʱ�Ļص�����
218 * @param nMsg {int} �û����ӵ��Զ�����Ϣֵ
219 * @param data {void*} ��Ϣ����
220 * @param dlen {int} ��Ϣ���ݵij���
221 */
222 void on_message(int nMsg, void* data, int dlen)
223 {
224 if (!(data && dlen == sizeof(RPC_DAT))) {
225 abort();
226 }
227 RPC_DAT* dat = (RPC_DAT*) data;
228 if (dat->req == NULL) {
229 abort();
230 }
231
232 if (nMsg == RPC_MSG) {
233 dat->req->rpc_onover();
234 } else if (nMsg == RPC_SIG) {
235 dat->req->rpc_wakeup(dat->ctx);
236 }
237 }
238
239 // @override
240 // ������ӿ�
241 void on_close(void)
242 {
243 delete this;
244 }
245private:
246};
247
248#ifdef ACL_WINDOWS
249#include <process.h>

Callers 1

on_acceptMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…