Loading...   


case ServerOP_WIRemoteCall:
			{
				char *id = nullptr;
				char *session_id = nullptr;
				char *method = nullptr;

				id = new char[pack->ReadUInt32() + 1];
				pack->ReadString(id);

				session_id = new char[pack->ReadUInt32() + 1];
				pack->ReadString(session_id);

				method = new char[pack->ReadUInt32() + 1];
				pack->ReadString(method);

				uint32 param_count = pack->ReadUInt32();
				std::vector<std::string> params;
				for(uint32 i = 0; i < param_count; ++i) {
					char *p = new char[pack->ReadUInt32() + 1];
					pack->ReadString(p);
					params.push_back(p);
					safe_delete_array(p);
				}

				if (remote_call_methods.count(method) != 0) {
					auto f = remote_call_methods[method];
					f(method, session_id, id, params);
				}

				safe_delete_array(id);
				safe_delete_array(session_id);
				safe_delete_array(method);
				break;
			}

Raw Paste Data