New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature - (2.0.0-beta) 'node' connection mode #7
Closed
lifely
wants to merge
18
commits into
rchatham:master
from
tillersystems:feature/node-mode-integration
Closed
Feature - (2.0.0-beta) 'node' connection mode #7
lifely
wants to merge
18
commits into
rchatham:master
from
tillersystems:feature/node-mode-integration
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…' in closure definition '() -> Void' and cleanup other broken things
… matter if people acess it or not
…ce a tuple of 'session, PeerSessionEvent' PeerSession is also improved and include more information on the session (it's kind node or slave and status 'available','unavailable'
Session factory is used for 'node' PeerConnectionManager 'mode', allow to create session when then main session is used as advertiser
…vents, re-order events
… logic Manager now offer three connection modes, 'master', 'node' and 'none' The goal is to still use 'PeerConnectionManager' as a standalone components than handle all multipeer connectivity abstraction In '.node' mode the manager will manage a unique 'session' for the service advertise, session will then be created for any other services connected through PeerBrowser
@lifely This looks super interesting! Very interested and thank you for contributing! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
status: last testing stage
This might looks like a lots of change but the pull-request include differents things:
EventProducers
forSessions
,Advertiser
&Browser
Sessions
-MCSession
delegate & event producerPeerSession
can represent either aadvertiser
session (local-service) or a connection to a 'distant-service' invited throughPeerBrowser
thus we now have access to the following attributes:
sessionPeer
- indicate this is adistance-service-session
and represent the peer advertising that servicerisLocalServiceSession
- computed property that checkpeer
againstpeerSession
isDistantServiceSession
- computed property tooPeerSession
can now takesecurity
parameter atinit
allowing to configurer the kind of security to use on theMCSession
Advertisers
-MCNearbyServiceAdvertiser
delegate & event producerAdvertiser didn't change too much, we can now use
discoverInfo
at init which couple withPeer.context
allow better introspection of services and peer.Before we used poorly named service to differentiate environment or restaurants, now we can name our services simply and use
discoveryInfo
to filter matching services.Browser
-MCNearbyServiceBrowser
delegate & event producerMain change to browser is the new
sessionFactory
logic introduced.The browser will use the
sessions
attribute when uses as a singleslave
connection,but will create new session through the factory if configured as
node
browser.This will allow to create new session for each services we're connecting to.