Coder Social home page Coder Social logo

Comments (4)

Bouke avatar Bouke commented on June 16, 2024

Hi Rob, I'm glad that this library might prove useful to you! The goal of this library is to be a drop-in replacement to Apple's framework. Currently publishing a service is mostly implemented, but browsing for services is not (see "not implemented" markings). The API is differing a little bit, as some classes used by Apple cannot be instantiated by this library. You can use compile-time if statements to work around this, see this example.

This package implements mDNS itself. I'm currently in the process of trying to use the Avahi backend for this instead. I'm not sure if/when/how this new backend will be available, but will mention this in either release notes / readme when appropriate.

Let me know if you run into any issues.

from netservice.

robreuss avatar robreuss commented on June 16, 2024

Thanks for responding so quickly!

I'm creating connections over the network between an iOS device and a Raspberry Pi, and so it's possible I'll be able to run your service on the RPi, and Apple's browser on the iOS device and have them coordinate a connection. Possible? Is mDNS also used by Apple's browser?

No problem to use compile time statements/stubs to work around - I already do that a lot because my framework runs on both and involves unsupported Apple frameworks unneeded on the Linux side.

from netservice.

Bouke avatar Bouke commented on June 16, 2024

Well you're in luck, the Raspberry Pi is also my target architecture. It makes things, well let's say, more interesting. I'm running Raspbian Stretch. The Pi is 32 bits and most of development of Swift only takes 64 bits into account. As a result, there's segmentation faults left and right. Be sure to test often to prevent having to rewrite major parts of your application. As I have already many times.

mDNS is the technology powering NetService. It has many names Bonjour / ZeroConfig.

So with the current master branch you basically can do NetService.publish on the Linux side, but not NetService.resolve. Browsing is supported, but I think you'll have to setup connections yourself.

from netservice.

robreuss avatar robreuss commented on June 16, 2024

Understood. I'm currently running my Raspberry Pi on Mate 16.04. I'll keep you posted as I move forward! Thanks Bouke.

from netservice.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.