How to use multiple bpipe servers?

3 Ansichten (letzte 30 Tage)
Rajesh
Rajesh am 6 Okt. 2014
The following call appears to support only 1 server as input: c=bpipe(authtype,appname,serverip,portnumber)
B-Pipe API allows setting multiple servers using following API calls to use alternative servers:
SessionOptions::setServerAddresses(ServerAddress[])
SessionOptions::setAutoRestartOnDisconnection(true)
How can we specify multiple servers in the MATLAB B-Pipe API?
Thanks, Rajesh

Antworten (1)

Bruno Pop-Stefanov
Bruno Pop-Stefanov am 7 Okt. 2014
Hi Rajesh,
You're right, bpipe can only open one connection at a time. However, you can use the function multiple times to set up multiple connections. Instead of a single function call to create multiple connections, you would have to call bpipe each time you want to open a connection. The function returns a connection object.
For example:
% for all servers
for i = 1:numServers
% open a connection and store the connection object in a cell array
c{i} = bpipe(...);
end
Once you're done, you'll have to close all the connections the same way:
for i = 1:numServers
% close the connection
close(c{i})
end

Kategorien

Mehr zu Develop uifigure-Based Apps finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by