Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Highlighted
Developer
Posts: 116
Registered: ‎11-18-2010
My Device: BlackBerry PlayBook
My Carrier: null

SocketMonitor available status

Hello dear developers.

 

I have a question regards SocketMonitor.

Working with it on desktop AIR application is without problem.

But at simulator I never get available = false in case I disconnect network cable or switch Disconnect at simulator.

Just a smalll code:

 

private var socketMonitor:SocketMonitor = new SocketMonitor("gatetest1.net", 30000);

public function PlayBookTest()
{
	this.socketMonitor.addEventListener(StatusEvent.STATUS, this.socketMonitor_StatusHandler);
	this.socketMonitor.start();
}

private function socketMonitor_StatusHandler(event:StatusEvent):void
{
	trace("Socket Status : " + this.socketMonitor.available)
}

 

Is there a way to monitor socket availability in simulator?

 

 

 

Developer
Posts: 116
Registered: ‎11-18-2010
My Device: BlackBerry PlayBook
My Carrier: null

Re: SocketMonitor available status

Ok, I found a way to solve my issue. I use URLMonitor and its working fine on simulator. But I cant understand why SocketMonitor doesn not.