discovery

Host is null in NsdServiceInfo of NsdManager.DiscoveryListener.onServiceFound

对着背影说爱祢 提交于 2019-12-05 07:52:53
I'm trying to get the mHost of the NsdServiceInfo passed as parameter to NsdManager.DiscoveryListener.onServiceFound() but it's null. I have two android devices where device 1 is the server and device 2 is the client. This is how I register the server in the device 1 public void registerService(int port, InetAddress myIp) { NsdServiceInfo serviceInfo = new NsdServiceInfo(); serviceInfo.setPort(port); serviceInfo.setServiceName(this.serviceName); serviceInfo.setServiceType(SERVICE_TYPE); serviceInfo.setHost(myIp); this.nsdManager.registerService( serviceInfo, NsdManager.PROTOCOL_DNS_SD,

Python test discovery with doctests, coverage and parallelism

我的未来我决定 提交于 2019-12-05 04:32:51
... and a pony! No, seriously. I am looking for a way to organize tests that "just works". Most things do work, but not all pieces fit together. So here is what I want: Having tests automatically discovered. This includes doctests. Note that the sum of doctests must not appear as a single test. (i.e. not what py.test --doctest-modules does) Being able to run tests in parallel. (Something like py.test -n from xdist) Generating a coverage report. Make python setup.py test just work. My current approach involves a tests directory and the load_tests protocol . All files contained are named like

How to discover the type of the NAT a given interface is behind

点点圈 提交于 2019-12-05 02:05:10
问题 I would like to discover the type of the NAT (FullCone, Restricted Cone, Port Restricted cone, Symmetric) a given network interface is behind. I've tested different tools (http://freshmeat.net/projects/jstun/, http://code.google.com/p/boogu/) but they report different results for the same interface. I'm looking for a definitive answer in Python (or other languages, 2nd choice being Java, if nothing else is available). 回答1: http://en.wikipedia.org/wiki/STUN NAT devices are implemented in a

How to find all available services using Android's native Network Service Discovery

北城以北 提交于 2019-12-04 06:31:45
I've read through android documentation on finding specific network services using NSD. Below is my code to discover all the available _http._tcp services. final NsdManager.DiscoveryListener discoveryListener = new NsdManager.DiscoveryListener() { @Override public void onDiscoveryStarted(String s) { Log.i(TAG, "onDiscoveryStarted: " + s); } @Override public void onServiceFound(NsdServiceInfo nsdServiceInfo) { Log.i(TAG, "onServiceFound: " + nsdServiceInfo.toString()); } @Override public void onServiceLost(NsdServiceInfo nsdServiceInfo) { Log.i(TAG, "onServiceLost: " + nsdServiceInfo.toString()

Web service discovery in WCF : Ws-Discovery or UDDI?

江枫思渺然 提交于 2019-12-03 17:48:11
问题 I know the distinction between UDDI and Ws-Discovery (well know location to search a service vs broadcast). But my question is : what is the simplest way to discover a webservice in WCF ? By simplest I mean what is already implemented in WCF and can be used now ? I've not seen any built-in implementation in WCF for UDDI or Ws-Discovery. Do you have any link, or experience to share about these two protocols in WCF ? UPDATE Now I'm thinking about three solutions, waiting for WS-discovery on

How to discover the type of the NAT a given interface is behind

北城余情 提交于 2019-12-03 16:17:10
I would like to discover the type of the NAT (FullCone, Restricted Cone, Port Restricted cone, Symmetric) a given network interface is behind. I've tested different tools ( http://freshmeat.net/projects/jstun/ , http://code.google.com/p/boogu/ ) but they report different results for the same interface. I'm looking for a definitive answer in Python (or other languages, 2nd choice being Java, if nothing else is available). http://en.wikipedia.org/wiki/STUN NAT devices are implemented in a number of different types of address and port mapping schemes. STUN does not work correctly with all of them

Network Device Discovery

懵懂的女人 提交于 2019-12-03 13:42:23
For my Android app, users need to connect to a server that will be hosted somewhere on the same LAN. There can be multiple servers hosted on the same LAN. To make it easy for the user, I was going to scan the current LAN that the Android device is connected to and then list all of the network devices that have the server running on it, rather than having the user input the IP to the computer manually. I'm fairly new to networking, and after some searching I found out that I would have to use a multi-cast DNS search or UDP broadcast to detect the other devices. I also found a nice library

Android, NSD/DNS-SD: NsdManager unreliable discovery and IP resolution

♀尐吖头ヾ 提交于 2019-12-03 12:21:32
问题 In the course of the last weeks, Android's NSD implementation is making me go mad: From a user's point of view, the following problems arise: Devices discover each other in a completely non-deterministic fashion. If I launch my NsdManager -based app, it works more or less if only two devices are involved. If a third device joins, it will seldomly discover the first two , and the first two will not see the third. If I exit the apps (they gracefully unregister the NSD listeners) and restart

Other than UDP Broadcast or Multicast, what other methods can I use on a WiFI network to discover computers?

别说谁变了你拦得住时间么 提交于 2019-12-03 09:14:29
I've implemented a simple UDP ping/pong protocol to discover other computers connected to the same WiFI router. This works fine on many WiFI and Ethernet routers, but when I go out on the street to give it a try, many public WiFI networks seem to have either UDP Broadcasts/Multicast disabled, or UDP disabled completely. What other options do I have to discover the computers connected to the WiFI router? (I'd love to create an Ad-Hoc network between the members of my network but this is not possible) I was thinking of brute forcing TCP attempts (trying to open connections to all possible IPs on

Web service discovery in WCF : Ws-Discovery or UDDI?

南楼画角 提交于 2019-12-03 06:29:52
I know the distinction between UDDI and Ws-Discovery (well know location to search a service vs broadcast). But my question is : what is the simplest way to discover a webservice in WCF ? By simplest I mean what is already implemented in WCF and can be used now ? I've not seen any built-in implementation in WCF for UDDI or Ws-Discovery. Do you have any link, or experience to share about these two protocols in WCF ? UPDATE Now I'm thinking about three solutions, waiting for WS-discovery on .NET 4.0, or maybe creating my own discovery binding with the Peer to Peer binding provided by WCF. This