-
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
Implement server selection #29
Comments
How does we get a server list? import createDiscovery from 'pipboylib/connection/createDiscovery'
var servers = createDiscovery();
servers.subscribe(function(newServer) {
$("#serverlist").add("<div>").text(newServer); // i know this is jquery, but I am desperate now.
}); with |
I also don't quite understand how this would communicate me, that a server is now gone again. |
Another question: |
@luckydonald If we change the observable to discover games over time with an interval we can also group the messages that we get back. We group them and thus would receive lists of the available server for each discovery |
@philplckthun how long should we wait? So somethin like this, except there probably is already some function in RxJS var serverList = [];
while (dontStop) {
var newServer = server.getSomeServer();
serverList.append(newServer);
if (nextIntervall == now) {
observer.onNext(serverList); // this does send, right? // python: yield serverList
serverList = [];
}
} also if that happens in the lib, we should keep the waitless version somewhere too. Edit just saw the sweet .bufferWithTime(10000) at #22 |
It's only one browser runtime with the Electron App, so long as they're just new Windows this isn't a problem. As for if we should do it, I'm not sure of the utility of having multiple pipboys on one screen for multiple games.
Re-triggering the probe after some time makes a good amount of sense, since we're working over UDP. The Fallout 4 server only responds once per broadcast and it's fairly quick. We could/should bump the TTL for the UDP packets as well to make sure that we're able to discover all the PCs and PS4s on a given local network (jokingly, making for dorm room or shared wifi tomfoolery). |
And I found reactivex -> Interval var source = Rx.Observable
.interval(500 /* ms */)
.timeInterval() // not sure what that does opposed to interval above With this it should be possible to let this call the server search and emission the results somehow |
Users should be able to select a server if more than one is available. Color can be the default green for the server selection since we don't know it yet (and don't have a local store).
The text was updated successfully, but these errors were encountered: