Ventuz Remoting4

Q and A about functionality and how to solve a special task for your application.

Ventuz Remoting4

Postby Jodaine Moore » 12 Jan 2017, 16:40

Hey all,

I would like to be able to control three different machines using a single app Which I have successfully done. It is all fine when I want to run the presentation with the same content. But I would like to be able to have control of the content on each machine. e.g some instances I may want to have the same content or I may want the content to be different but trigger at the same time.

* Is it possible to have different contents?

*How to access each machine separately?
eg. cluster[2].... will access machine three.

Is there any example projects floating about?

or any advice or direction would be appreciable.
Jodaine Moore
 
Posts: 25
Joined: 30 Oct 2015, 19:19

Re: Ventuz Remoting4

Postby Etienne » 04 Feb 2017, 21:21

You should be able to create 3 clusters to do this:

public void InitClusters()
{

leftCluster = new Cluster { Name = "Left" };
leftCluster.AddMachine(new System.Net.IPEndPoint(System.Net.IPAddress.Parse("192.168.1.101"), 19400));
leftCluster.Start();

middleCluster = new Cluster { Name = "Middle" };
middleCluster.AddMachine(new System.Net.IPEndPoint(System.Net.IPAddress.Parse("192.168.1.102"), 19400));
middleCluster.Start();

rightCluster = new Cluster { Name = "Right" };
rightCluster.AddMachine(new System.Net.IPEndPoint(System.Net.IPAddress.Parse("192.168.1.103"), 19400));
rightCluster.Start();

}

You could also create an array which will make it easier to iterate through all clusters:

public void InitClusters()
{

Cluster[] machines = new Cluster[3];

for (int i = 0; i < machines.length; ++i)
{
machines[i] = new Cluster { Name = "Machine " + i };
machines[i].AddMachine(new System.Net.IPEndPoint(System.Net.IPAddress.Parse("192.168.1.101"), 19400));
machines[i].Start();
}

}

In this example you will need to provide an array of IP addresses (String[] machineIPs) and use that array in the AddMachine command:

machines[i].AddMachine(new System.Net.IPEndPoint(System.Net.IPAddress.Parse(machineIPs[i]), 19400));

Hope this helps,

Etienne
Etienne
 
Posts: 15
Joined: 20 Oct 2014, 19:46
Location: Los Angeles, California

Re: Ventuz Remoting4

Postby Jodaine Moore » 10 Feb 2017, 12:39

Thanks, Etienne!! It works!!

In addition, I also came across a Class call multiport which manages cluster :)
Jodaine Moore
 
Posts: 25
Joined: 30 Oct 2015, 19:19


Return to How to...

cron