Is it doable to make Websocket interfaced with Java Swing front end? If so how?
Try mine:
http://github.com/TooTallNate/Java-WebSocket
Contains a Client and Server implementation. In the example folder there's a simple JFrame subclass called ChatClient. Look at it's source for a Swing reference.
Essentially you just need to subclass net.tootallnate.websocket.WebSocketClient and implement the onOpen, onClose, and onMessage methods. The class has an interface very similarly to the WebSockets API for HTML5.
Kaazing WebSocket Gateway ships with support for JavaScript, Flex, Silverlight, but also native Java clients (stand alone as well as applets). For more information, check out
http://tech.kaazing.com/documentation/index.html
Related
I am trying to build a teaching application using flash player. My idea is that when the teacher does something, such as changing the slides, the javascript calls the SWF interface which adds CuePoints to the rtmp stream, while the students listening on the CuePoint event, they are able to synchronize what the teacher is doing.
So I did my research and found out that I had to write some server-side script/module to support this. I tried Wowza Server and wrote a Java Module which defined a handler function so the AS was able to call
netconnection.call("handler_function", null, "myStream", arg1, arg2);
But sadly, I am using a third-party streaming cloud so I can't write server-side code. Is there any way to add the CuePoint only on the client side with ActionScript?
Dont have enough to mark a comment so posting it here. I did not use FMS/wowza recently, but using FMS I used to do this like the example at https://forums.adobe.com/thread/1152718?tstart=0
hope this will work same on wowza too. Thanks
I want to use WinRT API for WiFi Direct from Windows 10 SDK in Win32 Console Application. I know about C++/CX (and even made some progress going that way), but still want to make it work without this extension.
My problem is that I can't activate IWifiDirectDevice interface (from ABI::Windows::Devices::WiFiDirect) to access IWifiDirectDeviceStatics that provides an GetDeviceSelector method.
HStringReference strDevice(RuntimeClass_Windows_Devices_WiFiDirect_WiFiDirectDevice);
ComPtr<IInspectable> insp;
hr = RoActivateInstance(strDevice.Get(), insp.GetAddressOf());
This code ends up with E_NOTIMPL as a result. In Microsoft's example they used factories for activation, but ABI::Windows::Devices::WiFiDirect namespace has no factories.
Worth mentioning that IWifiDirectAdvertisementPublisher works just fine when activated the way I wrote before.
So how to activate IWifiDirectDevice from WRL?
Windows.Devices.WiFiDirect.WiFiDirectDevice is not an activatable class. You can see that by looking at windows.devices.wifidirect.idl.
You will need to use the static methods, e.g.:
HStringReference strDevice(RuntimeClass_Windows_Devices_WiFiDirect_WiFiDirectDevice);
ComPtr<IWiFiDirectDeviceStatics> wiFiDirectDeviceStatics;
hr = Windows::Foundation::GetActivationFactory(
strDevice.Get(),
&wiFiDirectDeviceStatics);
ComPtr<IWiFiDirectDevice> wiFiDirectDevice;
ComPtr<IAsyncOperation<WiFiDirectDevice*>> asyncOperation;
hr = wiFiDirectDeviceStatics->FromIdAsync(deviceId.Get(), &asyncOperation);
Consider taking a look at the Wi-Fi Direct sample.
I'm researching the possibility of using cocos2d-js by embedding it as a view inside an existing iOS app. In order to make this work, I'm going to need 2-way communication between cocos2d and the surrounding application.
After some initial investigation, I have determined that it is possible to call in to cocos using ScriptingCore:
ScriptingCore* sc = ScriptingCore::getInstance();
jsval outVal;
sc->evalString("function()", &outVal);
My question, then, is around doing the reverse. It is possible to (e.g. in response to user input) call back out of cocos2d-js to C++? Ideally, there would be a way to register a callback with ScriptingCore which could be invoked from JavaScript.
I believe it can be done, but I have not tried myself, nor can I find a good and concise example.
All I can do is point you at SuperSuraccoon's Bluetooth example and it's git page, which apparently does both ways communication between C++ and JS code.
I'm currently building an application that will use a few SOAP web services. I've gotten them all to work just fine using the mx.rpc.soap.WebService class, but now I am seeing designs for the first time and they require a progress bar. Looking through the mx.rpc live docs, I have not found anything that resembles a ProgressEvent for this package. Is a ProgressEvent (or something similar) dispatched by these classes?
I am injecting HttpContextBase into a caching class. HttpContextBase is registered as PerWebRequest. I interact with the caching class on each web request and this works fine, but I also need to initialise the cache at application start.
I understand that PerWebRequest does not work in Application_Start though:
castle PerRequestLifestyle not recognize
What is the best way to resolve this in my situation?
Not use stuff that depends on per-web-request stuff outside of web request.
If you need to depend on a class you registered as PWR I'd suggest getting another component for that service with different lifestyle and using it in Application_Start and using IHandlerSelector to return PWR one when you're within a web request, and the other one otherwise
Try using an hybrid webrequest/transient lifestyle.
To warmup caches when the container starts I usually use the Startable Facility.
Here is an example on how to use it:
http://blog.bittercoder.com/PermaLink,guid,a621ddda-acb5-4afd-84ff-faafb96a2fa1.aspx