browser.extension.getViews({type: "popup"}) is not working for edge extension - microsoft-edge-extension

Can someone give me some alternative as to how to send a message to a view in edge . I just saw the page for extension.getViews() here. It is incompatible with edge. So what should I use instead of this?

You should view Edge extension api status here: https://learn.microsoft.com/en-us/microsoft-edge/extensions/api-support/supported-apis#extension. From this link, Microsoft Edge has already supported browser.extension.getViews.

It is not a good practise to use getViews api. You can use runtime.sendmessage & runtime.onmeesage.addlistener to communicate between two context(bg an popup for example). Otherwsie you can use ports to do long time communication

Related

Google protocol buffers with loadrunner

I have a java web server that encoding the results to protocol buffers.
and my web client already decoding this info to real data.
we already testing these webserives via hp loadrunner performance tool.
we want to avoid creating duplicates of the webservices, so we want to connect the load runner to our proto classes to auto decode the data.
can any body suggest a solutions?
thanks
You need a Google Buffer DFE for LoadRunner, unfortunately such DFE doesn't exist yet so you can either develop this DFE on your own (and maybe share on HPLN in LR 11.52) and then everyone can enjoy it. Or write some manual code in C to do it (also publishable on HPLN).
You can try to check HPLN to see if anyone already implemented it but I doubt it.
It is always a good idea to check the LR support forum here:
http://h30499.www3.hp.com/t5/LoadRunner-Support-Forum/bd-p/sws-LoadRunner_SF

How to Know when device is removed from network Using Bonjour C library

I am using DNSServiceDiscovery C Library Bonjour to detect Camera and Printer.I am Using Windows 7 and Visual 2010.
http://developer.apple.com/library/mac/#documentation/Networking/Reference/DNSServiceDiscovery_CRef/dns_sd_h/index.html
I am able to detect the Camera and Printer.
Now I am wondering how to Get notification when device is removed from the network.
Suggest me how to implement this feature.
If you keep your DNSServiceBrowse operation running, you will eventually get notified when one of the previously-found services appears to no longer be present. This isn't an instantaneous thing, however. Keep in mind that the primary use case for Browse is to populate a UI from which the user can select a service.
After researching thoroughly, I can't find a way to do this.
There is no way in Bonjour Api to know when the device is removed.
If the device exposes some service and client program is synch up with that, probably we can know about it.I am doing the same for my application.

Asynchronous network interface status check

On Mac OS X, is there a way to get asynchronous notification when the network interface (en0, en1) status changes, such as network interface is active, inactive etc?
Instead of polling for the status, i would like to know is there a way to get asynchronous notification, so that whenever there is a change, notification is fired and app can handle it.
Is this possible?
Thanks,
It depends on exactly what changes in the network state you want to be informed of (e.g. do you just want to know when you gain or lose a network connection, or do you want to know things like if you've switched WiFi networks or some more esoteric detail like that), and if you provide more details about that I can provide a better answer, but generally speaking I reckon you want to use the SystemConfiguration framework, specifically probably the SystemConfiguration/SCNetworkReachability.h APIs (described in Apple docs here).
Even more specifically than that, I think SCNetworkReachabilityCallBack is the type of callback function you want to use. This here is the Apple documentation for it.
Finally, to set up that callback, I mean first you have to write your callback function, but to "register" it so SystemConfiguration will use it to call you back when your network status changes, use this guy: SCNetworkReachabilitySetCallback(_:_:_:) described in official Apple documentation here.
Hope this helps and if you want more specific help just add some more specifics to your question :)
Check the top answer here. It is for the iOS SDK but the SystemConfigration framework mentioned is available on Mac OSX too.

Any sample project that shows how to use gamekit (server-client model) WITHOUT(!) GKPeerPickerController and more than 2 devices?

is there any sample project that shows how to use gamekit without gkpeerpicker? And is there any sample that uses bonjour (but without any internet connection and no wireless router)?
Some informations (for both projects):
only bluetooth (bonjour for the other project)
more than 2 devices (if possible)
server client model (how to make it work)
send/receive data
the server can decide whether is is "visible" for other "potenial" clients
show in a tableview the "discoverd" devices -> if the user clicks on a tableview cell (the name of the device e.g. "Tom's iPod Touch") it is going to pair up but the other user must accept the connection (UIAlertView) and if he accepts they will pair up
show all connected peers (connected to the server) in a uitableview
kick out some peers (only the server can kick other) (this should be easy to implement. just send a special packet to the client with a string that says "KICK YOURSELF" than it will kick itself)
invite other clients (in search)
(don't really need this but would be awesome):
let clients/server move objects (physic objects in box2d (cocos2d)) and than every client should show the exactly same simulation on the screen.
After using google for some hours I think there's no sample project(s) that shows these "features" above. Mayby someone could make one? Please do not say me some theory. I read so much but a sample project (or more and another for the bonjour version) with code commentary would be great!
Edit: I will probably add some bounty on this ;). Currently I can't ;)
Thank you very much for reading :)
cocos2dbeginner
I'm not going to write this for you but I can help with some information to get you started. There are many examples that show some of your features, particularly Apple's witap example.
One thing to note, you can't go from bluetooth to bonjour. bluetooth is the method of communication, bonjour is how you communicate. So you'd have to do bonjour broadcasting on one side and connecting on the other. Bonjour over bluetooth is taken care of in Apple's API, it should "just work". See this for some more info here.
This page from apple not only has gamekit concepts you are looking for but it also tells you the method names you will be using to get your tasks done, even if you don't want to be going through the supplied UI that apple has with GameKit.
Here, here, here, and here are links for more bonjour networking samples. As long as you're not doing complex tasks with sockets, I like this personally, it makes things very simple.
Hope that helps some.
I highly recommend Ray Wenderlichs page.
There is a tutorial for Gamecenter networking that matches some of your requests.
http://www.raywenderlich.com/3276/how-to-make-a-simple-multiplayer-game-with-game-center-tutorial-part-12
According to your alias: There are many more useful tutorials with a high quality. Go to http://www.raywenderlich.com/tutorials for a list.
Apple themselves have demo projects that show wifi connections using GKSession and Bluetooth using GKPeerPickerController. If you wanted a peerPicker and an option for both I think you need to use a peerpicker controller to give the user a choice. Use this code at the point you want the picker to appear, after you have instantiated the picker.
picker.connectionTypesMask = GKPeerPickerConnectionTypeOnline | GKPeerPickerConnectionTypeNearby;
Then if they choose wifi use the code from the GKRocket project in the iOS Sample Code Library. If they choose Bluetooth then use GKTank.
The GKRocket code (using GKSession and tables) is much harder to follow but GKSession automatically uses bluetooth if there is no wifi coverage. Given that you will need most of the code for GKSession in your project to handle wifi I think it is easier to forget about peerPickerController unless you only want bluetooth.
Eventually Apple will surely add the necessary methods and properties to peerPickerController to handle wifi, but for the moment it is GKSession you need.
Hope it helps.

Simple C++ Instant messenger

I want to make a very simple c++ instant messenger for lan networks and internet (direct IP connect). I know little about sockets. I searched the internet, but nothing really helped. I would someone to suggest a howto/tutorial/guide. I just want to send and receive messages (in a console window, I'll create the gui later). I want it to be for both Linux and Windows. Thanks in advance!
Checkout Boost.Asio. It's portable, and it's also got an example that implements a simple chat.
check out Boost.ASIO
There's some source code here for a C/S chat application that you could probably use to get started.
Mas.
Example Code
Use boost, cross platform, under the link, straight forward example for client-server chat.