Stall network detection

Currently, I'm trying to understand how to implement a network dropout detector in my application.  I use HTTP and so often keep a socket opened for a long time and do a lot of things on it.  Therefore, a random network dropping out really hurts to ease of use and I need to address without delay as the BONE to cause a timeout.  I was wondering if anyone could share any advice or code on how best implemented it.  I know that Peter has mentioned something himself, of course anything either would be useful.

I thought a lot lately about the different ways that I could approach this problem:

The simplest way possible, in theory, would be a kind of timer.  I would like to start it at the beginning of any sequence of operations of e/s, and "kick after (possibly before) each successful socket read or write."  The problem is that there is no effective obvious way to do it with the BlackBerry API.  (at least not without coarse abuse TimerTask.)

Another option would be to have a TimerTask that runs whenever the is open, controls a set of variables on regular intervals.  I would update these variables around every success in reading/writing, and it could make its conclusions on this basis.  Of course, this raises a lot of questions on what the TimerTask interval should be, when start/stop, etc..

Any thoughts/ideas?

For a general watchdog, I use RealtimeClockListener.  But he gets only a kick every minute which is probably too long for the detection of dropping out of your network.  But you can use it to make sure that your stall network Detection still works.

Personally, I have a dislike of timers because they seem to be just the threads with time management, handling I can do myself.

And that's what I would do in this case.  I understand that you don't need that level of detail, but I'll put it in other players who are maybe not as clever as you are.

I would like to have a watchdog thread, in a shared storage (probably RuntimeStore), all the time.  It has two States, while waiting for a timeout and idle.  In both States, she waits on the synchronized object StallDetection (I just made that name, it's just an object).  He uses wait/notify on this object to tell the Thread to do some work.

This thread has two special methods, startTimeout() and cancelTimeout().

Use Thread will startTimeout on this thread, through Assembly and time-out interval.  This startTimeout method will set the timeout and save the connection object, and then notify the StallDetection object.  This will give the wire in life, ii will find that it has a connection, but the timeout did not, then he will change his timeout so that he wakes up in the time limit.

Now, there are only two possible situations:

(a) the network Thread called cancelTimeout to cancel the timeout, because it has a good answer.  cancelTimeout clears the connection just waiting for the Thread.  When the thread wakes up, he'll find the elapsed wait time, but there is no connection to cancel, so it will be simply define another timeout, in the distant future and wait again.

(b) the network Thread is suspended and does not cancel the timeout.  Then the Thread will wake up and see there is a link to cancel and cancel.

It is essentially an implementation of a timer, without start-up costs and stop all the time.  I think it's better in your situation where you have a network of Red wire all the time.  But perhaps not an ad hoc http connection.

Rather than use the two methods on the Thread, it should probably put up a model of the observer and so could be useful for a number of other situations.

I would use the RealtimeClockListener to just check this thread is alive (isAlive()), then start it again if not.

I would be interested in other options if people have other ideas and of course improvements on this!

And I hope this helps.

Tags: BlackBerry Developers

Similar Questions

  • Satellite M300-D4316 - wireless network detected but cannot connect

    Previously, I could use LAN wireless on my laptop but last week because I signed up to a bluetooth connection, Wi - Fi connection no longer works.
    It can even detect a wireless network around me; I don't see every time when I try to connect, & it asks me to diagnose the problem & said something like "the signal is too weak.

    I'm sure that is not the problem of wireless service - all my friends can connect to him!

    What should I do?

    Maybe the wireless LAN tipped off?

    Try to press Fn + F8 to toggle wireless devices.

    Also make sure that the wireless switch is turned on in the front and the sides of the laptop.

  • Satellite C660 - key FN and wireless network detection no longer works

    Hi people,

    As a result of a virus, I put my computer to its factory settings.

    I have however lost the use of the function fn (end?) of the keyboard since and therefore cannot control the lighting of the screen and so on via the F keys any longer.

    Also, my computer can not detect wireless networks more. I did all the required updates and checked the State of the wireless card, but still nothing.

    Any ideas?

    See you soon!

    Hello

    May I ask what system you have installed on this laptop?
    Is - this Windows 7?

    If you are using Windows 7, you need to install Toshiba Value added Package and Support Toshiba Flash Cards for utility work affects FN.

    I m nit course on the WLan driver because different C660-xxx supports various wireless network cards. Perhaps you could provide the name of the complete model of the C660-xxx
    This would facilitate the search for the Wlan driver.

  • 10 Windows installed successfully on early 2009 Mac Pro Quad but no network detected

    I installed Windows company 81 on my Mac Pro without problem, using the WiFi Edimax EW-7711MAC of OWX adapter, which went very well under 8.1.

    I have upgraded to Windows 10 company, works very well, "sfc / scannow" gave rise to no error, but the card WiFi has only a beta driver 10 to win, and I can't detect all of the networks. The pilot has been out since August, seems if it was questions, he would have been fired and Edimax support did not have any major problem with the driver beta for me. I had to run commands for the visible card.

    Not sure if this is a gap in the Bootcamp drivers as I lost it scrolling and keyboard Windows functions or the beta for the WiFi card driver is at fault.

    Device Manager sees the adapter, shows in the adapters in the Panel, just no networks are detected.

    Can what version of the drivers for Bootcamp I use with an Early 2009 Mac Pro Quad to work with Windows 10? I saw some "hacks" on the boards, especially for the Macbook Pro. Curious to know if anyone has found a combination of driver that works with this model or as.

    Can you check if WiFi issues on Windows using boot camp 10 solves your problem of WiFi?

  • Suddenly "not (wireless) networks detected.

    Hi guys,.

    So I was on my laptop this morning (have had and used WiFi for over a year without problem) and suddenly lost my wireless connection. I'm as Windows 7 64-bit family.  At some point, there are still about 10 connections available wireless - mine and neighbors. Suddenly, none are detected at all.
    -J' turned off the Windows Firewall (only firewall I have). There is nothing.
    -J' I unplugged my modem and router and reconnected them and restarted my laptop. Still no networks.
    -J' checked for driver updates (everything was up-to-date).
    -I can connect to my WiFi on my iPhone and on other computers in the House. So given that and all the other networks I see normally cannot be detected or the other, I think that the problem is with the computer itself.
    -J' also tried a system restore, but it is on the "restoration of the system initialization" forever without actually doing anything.
    -I can also connect to the internet on this laptop if I plug the cable directly into it.
    Any ideas what's happening here? I searched all morning through similar topics but have not been able to solve the problem. Thanks for any help, that all the world can offer.

    On my laptop, I knocked together the following keys: fn (function) + f8. This change wireless power. For some reason, it worked contrary to right click and disable wireless manually. My friend suggested this because he had the same problem and it is solved for him also.  Your laptop can use a different combination of fn + f_. No idea why this worked or if it will work for everyone, but I've tried everything else and it instantly solved the problem for me anyway...

  • Wireless NIC fail: no network detected

    I have two identical HP Pavilion G7, portable product #B5Z56UA #ABA, execution of Windows 8. Two nights ago, one of them stopped detecting my local WiFi network. I have 5 other devices that continue to detect & use the network wireless without problem, including the same model. The WiFi light is white (not in airplane mode). Cable connection works fine, but I need WiFi to work on it. Here's what I've tried so far:

    1. performance of the built-in Troubleshooting Wizard.

    2. update the Atheros, disabled/enabled the device driver.

    3. several reboots.

    4 downloaded the latest MS patches & updates the BIOS.

    5 spent an hour on live chat with an HP technician last night... He was no help at all and only told me to do the things that I've done and then he left on me.

    6. even tried a system restore to a point 3 weeks before.

    7. restarted the router & checked its configuration to ensure it was not blocking access.

    8. open the back cover of the laptop in order to ensure that the Atheros NIC is properly connected.

    So I don't think it's a problem with the software or drivers. As I said, it simply does not detect local, even if my laptop WiFi networks identical can pick up signals from LAN 3 in my neighborhood. Please help, or I'll have to go back to the store.

    HP sent a new wireless card. Atheros... I got it less than 24 hours after they said they would send it! I am of course very pleased with the quick action. I installed the spare part and the WiFi works again. The problem was a bad wireless NIC

  • New installation cannot network detection

    I had to reinstall my Windows 7 Home Edition 64 on my laptop with 9 Parallels Bootcamp partition following an upgrade of the OS. This laptop is connected to my home network via an Ethernet bridge with two different Mac and a Windows 7 PC.

    Installation as described worked perfectly on my home network, in particular with the office also runs Windows 7 Home Edition 64 before the reinstall.

    On my laptop (correctly working over the Internet through the same Ethernet Bridge), when I go to the Control Panel HomeGroup and click on it, it tells me that there's no homegroup (and me to create an offer only no option to join a).

    On my desktop PC, when I go to the same homegroup, there is a (which has been existing for two years) and I have the password for it, but I can't use it on the laptop because it does not detect. Passwords are rejected on the advanced sharing options, and I hasten to add that, of course, the ' discovery network is ON "on both computers.

    In the computer laptop system properties, I selected as in the PC of WORKING group.

    Any information on how to resolve this situation would be really appreciated!

    Thanks in advance.

    Finally, I found a solution to make my software work on the network WITHOUT being able to restore the residential group (see above). I could write the paths to the files, I needed the PC, and surprisingly the PC will appear in the selection of network drive tree! But before you write paths, no way I could select them as you normally would by selecting them.

    So I'm happy, my software works, but my network on the Windows partition not although everything seems to be normal (it's what network stores tell me too)...

  • iPhone Trusted Network Detection

    I try to get TND works on iPhones runing the 2.4.30.32 client anyconnect.  In our scenario, the user is able to establish a tunnel VPN via 3G of fine.  When active wifi and connect to our internal network (tusted), its 3G VPN tunnel ends.  I don't know if I should change my policy file or if it is still supported on iPhones.  Is attached a copy of my policy file.

    Hi Tom,

    Well, TND will work as I've described, but I guess that not the way that you expect to operate.

    I.e.

    1 active user 3 G-Online TND automatically opens the VPN

    2. the user brings his phone in the office and connects via wifi. -Online TND detects 1 confidence and 1 interface reliable and done nothing (tunnel remains upward)

    3. the existing VPN tunnel that is connected via 3 G never get is demolished. -Online OK, until the user manually disconnects the connection 3G (then TND detects that there only a reliable network to the left, and so it rips in the tunnel).

    In other words, TND means "If there is at least one untrusted network connection and then raise the vpn".

    TND did not say "If there are two a reliable and trusted network connection, bring down those unreliable."

    Or to summarize, TND only controls the up/down of the State of the VPN tunnel, it is not controlling the high to the low status of the connections network/interfaces.

    I hope that clarifies, if not let me know.

    concerning

    Herbert

  • My games freeze and I have to refresh the page, windows network detects problems with pakage 1.0

    Windows network diagnostics detects connectivity with windows version 1.0 package! IAM helpless! My games freeze and I have to keep refreshing page and its helppppppp frustrating!

    Hello

    Thanks for asking!

    1. what game are you talking about?

    2. are - what you're talking to online games?

    3 have there been recent changes to the system before the show?

    If you are referring to online games, I suggest to follow the link and follow the steps. Check if it helps.

    The problems of games online using Internet Explorer

    http://support.Microsoft.com/kb/2528246

    Reply back with the results. I'd be happy to help you.

  • No wireless networks detected even they are available and wifi is turned on

    Hi all

    I can't see the wireless networks available even they are available, and always I see red x mark on wirelss icon beside the clock.

    laptop: HP ProBook s 4540

    OS: windows 7 Ultimate

    WiFi adapter: Ralink RT3290 802.11bgn Wi - Fi adapter

    I installed the latest update by connecting computer laptop eithernet cable and search launch legacy manager, alwas says:

    "the best driver for your device software is up-to-date.

    Please any idea of help.

    Thanks in advance.

    Thank you very much for your quick response, actually this problem is solved by changing the country / region of the Device Manager wifi adapter, I tried more region until I had access to available networks.

    Thanks again

  • Wireless network detection problem

    using M30X-S171ST

    the wireless card is enabled. The router is configured to allow wireless connections. the wireless adapter is unable to find the link. This card cannot be automatically configured by windows either. How can I check my setting in Configfree. I have properly configured SSID and the TC/Ip parameters are defined automatically. What Miss me...

    Hello

    You should be able to search for wireless networks in the ConfigFree Radar-utility. When you find your access point, make you a link between your computer and the access point. This will take you to the standard dialog box where you enter the SSID and encryptionkey (as appropriate).

    Good luck

    Tom

  • Re: Satellite Pro L770 - networks detected but inaccessible

    Hello

    Yesterday I received my new toshiba, and since then, I can't connect to any wifi network. My model is the Satellite Pro L770. So I can find many networks, but when I try to connect to one of them, the connection fails:

    -My home network, which is of WPA/TKIP. I enter the password, and after several seconds, I have an error reported, with very little information about the causes.

    -A public network (free, a french access provider), which should actually connect and redirect me to an authentication page. But in this case, I have limited access and if I try to connect to google, I have a DNS problem, so I can't use public network too. Here, I get an IP address, but no gateway, it's maybe normal that I'm not sure.

    I must say that I have an Android phone with which I can connect to my own wifi. I tried to unplug, in order to avoid any conflict of IP, but the result is the same. My machines are ready DHCP, and my router has active DHCP mode.

    Any help would be much appreciated.
    Thank you.

    Hi lapsus63,

    Have you tried updating the driver WLAN and wireless network card appear correctly in Device Manager? You can download the latest WLAN driver on Toshiba WLAN official Portal:
    http://APS2.toshiba-tro.de/WLAN/

    Satellite L770 is brand new model mobile phone, so there is not a lot of discussion about it here in the forum. What you can also do is disabling feature of wireless network adapter in the power management Windows for each power of energy saving profile.

    I hope that helps! :)

  • stream HP 11: hp show no network detected

    have a hp 11 stream that is less than 1 month old.  all of a sudden laptop could not connect to the wireless network.  Troubleshooting that says no driver could be found.  then downloaded the driver from the website of hp from another computer and it ran on the hp 11 stream.  restarted and it worked.  However less than an hour the same problem came once again.  I ran again the driver network again and it could connect to the network again.  is there a permanent solution to this problem?

    After the call to support the Japan HP, they recommended to restore the system to its original factory State.  It worked for the Realtek network driver to be installed in the device driver and so now I can connect to the internet now.

    I hope it's a permanent solution, but not sure of the source of the problem, so can't say for sure right now.

  • Wireless Assistant is on, wifi light stays orange, no networks detected

    DV9000T

    Windows XP sp3

    Intel wireless wifi link 4965AGN

    I used only the ethernet cable for internet access since I bought the new laptop. Now I need to use the laptop on the road and need wifi service. Said device adapter Wireless Manager is installed, has the latest drivers and works correctly, the wireless network connection is enabled as says it's working properly. With the ethernet cable disconnected, wireless Assistant works correctly, the current wireless broadcom LAN drivers are installed. The wifi button varies from Assistant wireless wireless wireless off on. Seeing orange for button wifi never never turns blue, some networks are.

    Any help or assistance would be greatly appreciated.

    Thank you!

    Success! Thank you for your fast help. I tried your recommendations 1-3, unsuccessfully, tried 4, but had no Recovery Manager on my computer, although I downloaded it later. I have yet to 5, but I was comfortable that go far if necessary. I had already updated the drivers through Internet HP site without success. The help of your suggestions and the treated well thought, I tried other sources to get the necessary software. I finally ended up at the Intel site and used the Intel Driver Update Utility, who has found a new driver and software that was not available at HP. I downloaded and installed the new software, and the wifi worked instantly, as well as the light changes to blue.

    I would not have found the solution without your help, and I am very grateful not only for your recommendations, but for how quickly you responded. You were a life saver, thank you!

    John

  • reconnect the stall network of shared network variables

    I have a cRIO unit communicates with a laptop using shared network Variables, one of them being a table of 21 index which is buffered.

    The system connects and communicates very well, but sometimes the wireless laptop card is to lose the signal from the WAP, attached to the cRIO.

    In this case the network never shared Variables "reconnect" and start to receive values still once the wireless link is restored.  Is this expected behavior?

    When I tried to use other WAP industry instead of the card laptop wireless, I get no abandonment.

    Hello Ryan,

    Please contact National Instruments!  I looked into the problem you are having and I wanted to ask you a few questions more.  First of all, you have a period of time which allows the reconnection?  I believe that the Shared Variables should find the connection after a short period, but it may not be a very quick process.  It may take a few minutes to the Variables shared to reconnect.

    The other thing that could happen is if you have error son being passed by shared Variables, it is possible that the error is not be deleted, and so he will always see the error and not a so never reconnect.  In this case, you will need to filter this error and then clear the error in order to use again shared variables.

    If you have more specific information about your program that can help us to determine the reason for this behavior.  As a screenshot of your code would be useful.  Please let me know if you have any other questions and I'll be happy to help you.  I hope this helps!

Maybe you are looking for

  • How to install check speller of the Serbian language in Linux Mint

    Hello, I use Thunderbird 31.6.0 on my Linux Mint 17. I tried to follow the instructions that are on this web site to install dictionaries new Auditors of spelling, but it does not work. It is said that it is not available for my platform. However on

  • NB200 - C000021A error and blue screen appears

    Hi people, I have the following problem with my notebook of mothers a Toshiba NB200 - 10g. Basically it was a virus or a virus a little these days. Downloaded avg and malwarebytes in the hope of resolving and it has problems but pop ups were still ap

  • 4500ps: 4500PS 84.11:01 no Visible jam

    When the user tries to load the paper there is no 'beep', recognizing that the paper has been fed into the machine. The user tries now gently feeding the paper through the side out to see if an invisible piece of paper can be dislodged, (blue lever t

  • Satellite A210-171 application password

    I have a satellite phone 210-171.When I turn on the laptop I get the toshiba screen, then it asks me a password. I did not put any onlt going to enter windows. If hell what this password so that he asks me? I even tried to use my drive back, but in v

  • G6-1b60us: replacement laptop wlan

    The other day, I pointed out that the BIOS of my computer laptop g6-1b60us (product # LW350UA #ABA) has not agreed a new wlan module, even though it was a Ralink 5390, which is among the pieces that are listed as spare parts. He said he needs HP on t