Closed acb closed 6 years ago
Ah so poking around in the source I see why there's no Server; in your index.js
you have
module.exports = {
Client: require('./lib/client'),
Base: require('./lib/index')
}
So is Base
what Server
actually is? It looks like it might be, in which case the docs on here just need to be updated.
Well maybe Base
isn't quite a Server
...it doesn't have a start()
function though it does have _start()
, not sure if that does the same thing, or even what objects I'm dealing with at this point.
Hi @acb, thanks for your questions. This is a fork from node-ssdp, so the API and the examples pretend to be the same. However, the SSDP server has not yet been implemented because our main use-cases are as a client.
I can't invest right now time into building the Server API, I however invite you to submit a PR!
Ah, that makes sense. The docs confused me. I'll take a look and see if it makes sense to extend this or use something else. Thanks!
I've got this module all installed but for some reason there's no
.Server
property when you require the module. In your example code you haveBut that's throwing
undefined is not a constructor
because there's no.Server
property on what comes out ofrequire
.The module's definitely installed as the require is fine, and
.Client
works fine, returning theSsdpClient
constructor. I logged out all the props on what's returned fromrequire('react-native-ssdp')
and the only two properties areClient
andBase
. Where's theServer
, and how do I access it?react-native 0.51.0