-
Notifications
You must be signed in to change notification settings - Fork 7
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
(Re)connect #22
Comments
We also need to catch when it's connected yet a pipboy is not available yet. |
Also if the connection breaks. Not sure if that is handled. |
I think it would be great if it could display everything even without connection. So you already load all the components, but have a (re-/dis-)connect button somewhere. |
Steps we need implemented:
|
I digged a bit in the code. I believe we need to check on the This must be possible somehow! |
@luckydonald Nope, those errors are just for the discovery. These are btw emitted on the observable, which completes after that. So for example an RxJS observable works like this:
in our case we might want to complete the observable ourselves to end the discovery. On an error it might looks like this:
We actually atm use the pipboylib promise wrapper that transforms this discovery observable into a promise that just emits a single server. The errors that should send us back to the server selection are actually here: https://github.com/RobCoIndustries/pipboylib/blob/master/src/decoding/createObservable.js |
I tinkered with this last night and wasn't really sure how I'd get the let d = createDiscovery()
.bufferWithTime(500)
.first()
.subscribe(servers => {
// stuff
});
// can't dispose this until completion Seems like it autodisposes somehow though? > var d = pbl.connection.createDiscovery().bufferWithTime(500).first().subscribe(function(s) { console.log(s) }); d
AutoDetachObserver {
isStopped: false,
observer:
AnonymousObserver {
isStopped: false,
_onNext: [Function],
_onError: [Function],
_onCompleted: [Function] },
m:
{ isDisposed: false,
current: AutoDetachObserver { isStopped: false, observer: [Object], m: [Object] } } }
> [ { IsBusy: false,
MachineType: 'PS4',
info: { address: '192.168.1.71', family: 'IPv4', port: 28000, size: 50 } } ]
> d
AutoDetachObserver {
isStopped: true,
observer:
AnonymousObserver {
isStopped: true,
_onNext: [Function],
_onError: [Function],
_onCompleted: [Function] },
m: { isDisposed: true, current: null } } |
@rgbkrk This observable in particular is being disposed because it completed. Once an observable sequence is complete there is no need to keep it around. In this case you've used |
@luckydonald worth pointing you towards RxJS, what we're using under the covers for pipboylib.
|
@philplckthun Ok, sweet. I'll be using this then later this evening! |
Above I was actually speaking of the discover & connect to game process, which doesn't seem to happen except on app startup. |
@luckydonald We just have to send the discovery payload multiple times, I guess, as long as there's a subscriber |
like |
@luckydonald Yea, but inside the observable. |
@philplckthun so inside the library? Wont that break existing code? |
There was some nice diagram in gitter which outlines the connection process |
To better test the discovery locally, there is NimVek/pipboy (python) capable to simulate the PC app. |
Bump. |
That's ok, sorry we haven't been working on it. Got pulled in for some other work in my free time. Thanks for pinging @luckydonald. |
Starting it besides (and before) a fullscreen running Fallout is difficult, as it doesn't seem to retry connecting...
update:
Steps we need implemented:
(Just tick them when done.)
The text was updated successfully, but these errors were encountered: