English 中文(简体)
Maintain Socket Connection for React native project in Application state (active , inactive , background)
原标题:

I m working on a react native project I want to create a socket connection to interact with the server the aim of the connection is track user location and to send specific events when action required , What I was expecting is the socket to stay alive as long as the application isn t terminated but the connection were killed if the application was inactive or the phone is locked so the OS is terminating all the TCP connection

is there a way to keep the connection as long as the application isn t terminated or what alternative solution we have for the case

  • Background fetch doesn t work because in IOS i can send an event every 15 minute minimum
  • Previously I was using Background Geolocation it was working fine but not always and for long term like 8 hours

Thanks :)

I want to maintain the socket connection even if the Mobile is in lock screen or application in background for the connection I m using SignalR

问题回答

暂无回答




相关问题
Max Outgoing Socket Connections in .NET/Windows Server

I have a slightly unusual situation where I m needing to maintain CLIENT tcp connections to another server for thousands of mobile users on my servers (basically the mobile devices connect to my ...

Determine the remaining TTL of a multicast packet in Java

If I have a Java program that listens to multicast data, how can I tell what the remaining TTL of the incoming datagram is? I know how to set the TTL on the sending multicast socket, but I want to ...

Python socket not receiving anything

I m trying to receive a variable length stream from a camera with python, but get weird behaviour. This is Python 2.6.4 (r264:75706) on linux(Ubuntu 9.10) The message is supposed to come with a ...

Connecting to a Source game server in VB.NET

I m developing an application that detects Source-based games running on the LAN. Following up on the specifications provided by Valve, I have it narrowed down to exactly what I want: making a UDP ...

What can cause select to block in Python?

Here s a snippet of code I m using in a loop: while True: print loop rlist, wlist, xlist = select.select(readers, [], [], TIMEOUT) print selected # do stuff At a certain point, ...

Socket.UseOnlyOverlappedIO?

Does anyone know what Socket.UseOnlyOverlappedIO does, and if so, does it affect performance? There seems to be no real explanation on MSDN. Thanks in advance.

热门标签