Code: Select all
???unsigned int netCount;
???unsigned int * result;
???/* ------------------------- */
???netCmdInitialize(a);
???result = (unsigned int*)netCmdAdd(a, NETCMD_QNETCOUNT, 0, 4);
???netCmdExecute(a);
???netCmdWait(a);
???netCount = *result;
???
???netCmdClear(a);
???result = (unsigned int*)netCmdAdd(a, NETCMD_QNET, 0, 4 * (netCount));
???netCmdExecute(a);
???netCmdWait(a);
???/* -- copy results; we are about to reuse this packet. -- */
???for(unsigned int x = 0; x < netCount; x++){
??????((unsigned int*)(a + 0x1000))[x] = result[x];
???}
???netCmdClear(a);
???netCmdAdd(a, NETCMD_NULL, &netCount, 4);
???for(unsigned int x = 0; x < netCount; x++){
??????netCmdAdd(a, NETCMD_NULL, &((unsigned int*)(a + 0x1000))[x], 4);
???}
???netCmdExecute(a);
???netCmdWait(a);
Also, the packets are not copied from process memory to process memory. They are shared using a technique that allows shared memory to not become a security issue in any way - except for bugging problems writting secure information onto shared packets.... And, not having to resend the packets by using persistant packets.
I also have a idea and im sure it will work, not 99.9% sure. That persistant packets(not being sent each time) can be used with remote system by way of distributed processing. Since the programs are writting using this model; lag time from networking would be natively handled.
For one thing, getting rid of the need to copy results out of the packet just to reuse it is something I know can be done.
I just could not wait to post something. Im sorry.
If someone wants to see all the code I can send it via email. You need MSVC to compile it right off the bat. It consists of the kernel project(kernel). The two programs firstapp, and vgas.
HAHAHAHAHA