Mar 9, 2019 11:11 AM
(This post was last modified: Mar 9, 2019 11:12 AM by 3oxic.)
Hello everyone,
Last day's I was trying to do this in c++:
Let's say I have a function foo(arg1, arg2), one client and one server.
arg1 can be any type, arg2 can be any type and foo can return any type of data. function Foo also has always to arguments.
I want the client to take as an input this function(for example):
and then this function to be transferred and executed on the server.
I tried to build dynamic library with this function inside with templates. However templates are not supported with extern "C".
So any idea how can I implement this?
I know this is not secure but its only for educational purposes.
Last day's I was trying to do this in c++:
Let's say I have a function foo(arg1, arg2), one client and one server.
arg1 can be any type, arg2 can be any type and foo can return any type of data. function Foo also has always to arguments.
I want the client to take as an input this function(for example):
Code
foo(arg1,arg2){
if(arg1<arg2){
return 1;
}else{
return 5.2;
}
}and then this function to be transferred and executed on the server.
I tried to build dynamic library with this function inside with templates. However templates are not supported with extern "C".
So any idea how can I implement this?
I know this is not secure but its only for educational purposes.



