RobCoIndustries / pipboylib

:thumbsup: Companion pip boy library for Fallout 4
Apache License 2.0
130 stars 11 forks source link

Observable discovery #40

Closed rgbkrk closed 8 years ago

rgbkrk commented 8 years ago

This creates an observable out of the UDP Discovery. I'm assuming in practice someone will want to only run this for a little while (UDP packets don't last forever!):

var pbl = require('pipboylib');
var x = pbl.connection.createDiscovery()
  .bufferWithTime(250)
  .first()
  .subscribe(x => console.log(x))

Please bikeshed on the name for me, I didn't know what to call it.

kitten commented 8 years ago

:shipit:

rgbkrk commented 8 years ago

Probably worth noting that I made this in addition to the other discovery so that it would be part of a minor release (new feature in, nothing else different).

rgbkrk commented 8 years ago

Shipped as v1.1.0.