Skip to content
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

Network Discovery #7

Open
praeclarum opened this issue Dec 17, 2015 · 1 comment
Open

Network Discovery #7

praeclarum opened this issue Dec 17, 2015 · 1 comment

Comments

@praeclarum
Copy link
Owner

Currently the server binds to 127.0.0.1 and listens on a fixed port. The client connects to 127.0.0.1 with that port.

This works great for the iOS simulator, but pretty much nowhere else.

It would be nice if the clients and servers can discover each other. This would enable Visual Studio bridging scenarios and also running on Android devices. It would also enable previewing objects on multiple platforms simultaneously.

So, we need a network discoverability layer that works on many platforms. Any ideas?

@rdavisau
Copy link
Collaborator

I have basic service discovery implemented in a PCL-friendly library here. Given that project is 'alpha' and not getting a lot of love at the moment, I could factor out the service discovery code into a separate lib (as I have used it on a few projects now), or you could take some hints from the code. The core PCL sockets library that it is based on is stable. It was designed to be generic (too generic, probably - as you will see if you look at the code) - but the standard case is as succinct as in the readme. In summary, you define a shared 'request/reponse' protocol, which is a discovery port, an "object to send as a request", and a "response to send for a given request object (or nothing)"; then the library handles the rest:

There's a strongly-typed implementer of IServiceDefinition that lets you work with POCOs rather than bytes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants