title: TCP/IP connection in background of UWP
body: <p>Scenario. I want to make UWP(8.1/10) library (somekind of remote diagnostic of app) which works with my server. Is it possible to keep tcp/ip connection in background as long as possible?</p>
  
  <p>I know about two things:</p>
  
  <ul>
  <li><a href="https://docs.microsoft.com/en-us/windows/uwp/launch-resume/run-in-the-background-indefinetly#run-while-minimized" rel="nofollow noreferrer">Run while minimized</a></li>
  <li><a href="https://docs.microsoft.com/en-us/windows/uwp/launch-resume/run-in-the-background-indefinetly#run-background-tasks-indefinitely" rel="nofollow noreferrer">Run background tasks indefinitely</a></li>
  </ul>
  
  <p>But if I want to insert my library into some app and then upload it in Store, it won't work, am I right?</p>
  
  <blockquote>
    <p>However, developers writing UWP apps for personal use (that is, side
    loaded apps that won't be published in the Microsoft Store), or
    developers writing Enterprise UWP apps, may want to use all resources
    available on the device without any background or extended execution
    throttling. Line of business and personal UWP applications can use
    APIs in the Windows Creators Update (version 1703) to turn off
    throttling. Be aware that you can't put an app into the Microsoft
    Store if it uses these APIs.</p>
  </blockquote>
  
  <p>Also I have read about ExtendedExecutionSession when app minimized from these questions:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/49857055/run-background-task-indefinitely-in-uwp">Run Background Task Indefinitely in UWP</a></li>
  <li><a href="https://stackoverflow.com/questions/45324141/extendedexecutionsession-can-we-run-uwp-like-desktop-app-without-suspending">extendedExecutionSession : Can we run UWP like Desktop app without
  Suspending?</a></li>
  </ul>
  
  <p>But I'm still confused. So, can I make library for UWP(8.1/10) with long-running background tcp/ip connection and insert into app which will be uploaded in Windows Store? </p>