-
Notifications
You must be signed in to change notification settings - Fork 1
HubManagement
A hub is a remote entity that allows peer encounter of long wide area networks and routed protocols, e.g. IP, see ASAPHub wiki.
In ASAPHub terms: We are on peer side. We want our peer establish a new connection to another peer over a hub. First, we need a connection to a hub.
SharkPeerBasic sharkPeerBasic = …; // discussed previous sections
HubConnectorDescription hubDescription = TCPHubConnectorDescription(“localhost”, 7070, true);
sharkPeerBasic.addHubDescription(HubConnectorDescription hubDescription);We introduced a concept of hub descriptions. It describes how to connect to a hub.
A hub is provides an open port 7070 via TCP in our example. The final true set the multichannel option on. A new TCP connection is established for each peer encounter. This peer can communicate with more than one peer. There are more than one connection to the hub. You decide in your application context if either of both is an advantage, a disadvantage or neither.
Descriptions can be removed yb calling removeHubDescription(hubDescription).