Turn.Server.Allocation.TouchLifetime C# (CSharp) Method

TouchLifetime() public method

public TouchLifetime ( ) : void
return void
        public void TouchLifetime()
        {
            created = Environment.TickCount;
        }

Usage Example

Example #1
0
        private void TurnServer_PeerDataReceived(ref ServerAsyncEventArgs e)
        {
            //lock (syncRoot)
            {
                try
                {
                    Allocation allocation = allocations.GetByPeer(e.LocalEndPoint, e.RemoteEndPoint);

                    if (allocation != null)
                    {
                        allocation.TouchLifetime();

                        if (allocation.IsActiveDestinationEnabled)
                        {
                            e.LocalEndPoint  = allocation.Alocated;
                            e.RemoteEndPoint = allocation.ActiveDestination;
                            e.Count          = e.BytesTransferred;
                            e.ConnectionId   = ServerAsyncEventArgs.AnyNewConnectionId;

                            peerServer.SendAsync(e);

                            e = null;
                        }
                    }
                }
                catch (Exception ex)
                {
                    logger.WriteWarning(ex.ToString());
                }
            }
        }
All Usage Examples Of Turn.Server.Allocation::TouchLifetime