How can we improve the Windows platform?

Keep sockets running until app is officially closed

I was excited about sockets support until I found out that on every single app I downloaded that use sockets, if I switch to a different app, the start screen, or turn off my phone's display, the socket disconnects. This sucks, for a number of reasons.

When switching away from my app, *as long as my app is still in the task switcher*, I want to be able to suspend the UI while maintaining my socket connection (and any necessary base operations required to do so). I don't want to have to reconnect to IRC or SSH or RDP every time I hit start or switch tasks or just turn my screen off. It takes time, and is annoying to me and the people I'm talking with (plus I miss things in the meantime!)

All information I've been able to find on the subject suggests this is not currently possible.

476 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    planetarianplanetarian shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    11 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • Anonymous commented  ·   ·  Flag as inappropriate

        A lot of legacy protocols can't be wired up in a modern way with server side asynchronous notifications. Telnet is one example, as well as many other chat apps.

      • phildaubphildaub commented  ·   ·  Flag as inappropriate

        Sorry, but you havent understood the very basics of windows phone development if you make such suggestions...

        It is all about great user experience and power saving: this means if your app is not in the foreground, it has to be dead/tombstoned and _not_ consuming power/performance-related ressources like cpu, gpu, network, etc. As a developer you have plenty of possibilities to create the same feature-rich experience without having to run in the background all the time: let a server (e.g. cloud hosting) keep alive the connection to the IRC, SSH, RDP, etc. and forward important events via push notifications.

        Yes, it is easier for a developer to just have the app running all the time in the background like on android, but the user has to pay the price with bad performance and bad battery life (just like on android). This is just what I love with WP7: developers are forced to write 'good' apps (in a sense that they behave like the user expects, not in a sense that it is easy for lazy developers).

      • 斌 沈斌 沈 commented  ·   ·  Flag as inappropriate

        this is really bad user experience if an messaging app keep reestablish connection every time it is activated. this really sucks!!!!

      • AnonymousAnonymous commented  ·   ·  Flag as inappropriate

        Really really needed by an OS that want kick android...it is ao funny if i develop a im program...and it ia not possible to make a sockect keeps running....so so so so so ao big mistake MS...pls hear us....your customer ....how many times we have to say this ?????
        maybe this reason why yahoo wont making an official ym for us

        I have an android device....but im not tolerant about piracy....but this feature is a must have on our lovely windows phone device....pls MS hear us
        Sorry for my bad english

        from east java,indonesia

      • Saija EteläniemiSaija Eteläniemi commented  ·   ·  Flag as inappropriate

        This is very important feature. Lumia 800 would be perfect phone if it would have this feature. I mostly use my phone at home ( and everywhere where's possible) with WiFi connection. Sockets just simply close when WiFi shuts down when screen is locked. As an active SSH user this is a big no-no, and I'll put all my possible votes for this to be fixed. Let the user do the choice between battery saving and WiFi / Sockets usage!

      • RudyRudy commented  ·   ·  Flag as inappropriate

        Definitely needed. It's horrible for IM clients when they reconnect. Now it's true that there is a background download feature (like iOS), but this is different. I doubt this feature will pass though, especially with the very strict battery considerations by MS. :(

      • Krzysiek Krzysiek commented  ·   ·  Flag as inappropriate

        This is a must for various instant messaging communicators.
        Users can't be disconnected from server because they just want to reply sms, receive call, check something in calendar...
        Push notifications aren't any useful in there situations - maintaining and servicing additional server just for proxying is total nonsense.
        The best solution would be to add network agent - this way users can still receive messages via e.g toasts.
        Of course some sort of background agent<->app communication api is also required.

      • MiwaMiwa commented  ·   ·  Flag as inappropriate

        What's really annoying is that MS will allow streaming audio providers to keep sockets open. So they'll let users waste battery on non-useful audio streaming (you can at least play music from the local storage!), but trying to use your hand-held communication device for communication is a no-no. Biggest regression from WM6.5.x.

      • PaulosPaulos commented  ·   ·  Flag as inappropriate

        Absolutely needed feature! Sometimes it's just impossible to establish a new connection without breaking something important that was in the first session.

      • SleepyDaddySoftwareSleepyDaddySoftware commented  ·   ·  Flag as inappropriate

        I really need this for my telnet application. This is the most requested feature from my users. What i need is the networking background task API that is in windows 8. This API allows you to hand over your open sockets to the OS when your app is suspended, then the OS keeps the socket alive and buffers incoming data, and i think it even triggers your background task for processing incoming data on the socket.

        The only option at the moment is to run under the lock screen, but i didn't go with this option because it's a terrible user experience. Sockets don't stay open reliably under the lock screen, and not at all if your socket is over WiFi.

      Feedback and Knowledge Base