the documentation states that its possible to build an array of interfaces with one server and several clients. Is it also possible to have one client and serveral servers?
Furthermore is it possible to define an array of single interfaces with individual server and clients? For example like this:
Code: Select all
interface interface1{
void var(int value);
};
void task1(server interface interface1 iface[]){
select{
case iface[int i].var(int x):
printf("interface: %i, value: %i\n", i, x);
break;
}
}
void task2(client interface interface1 iface[]){
iface[0].var(1);
}
int main(void){
interface interface1 iface[6];
par {
task1(iface[0]);
task2(iface[0]);
task1(iface[1]);
task2(iface[1]);
}
return 0;
}