/// <summary> /// Associates a Session with this Client. /// </summary> /// <param name="session">The Session to associate with this Client.</param> public void RegisterSession(ISession session) { if (_sessions.AddIfAbsent(session)) { session.AddSessionDestroyedListener(this); session.RegisterClient(this); } }
public EndpointPushNotifier(IEndpoint endpoint, IClient flexClient) { _id = Guid.NewGuid().ToString("D"); _endpoint = endpoint; _flexClient = flexClient; _session = FluorineContext.Current.Session; if (_session != null) _session.AddSessionDestroyedListener(this); flexClient.RegisterEndpointPushHandler(this, endpoint.Id); }
public EndpointPushNotifier(IEndpoint endpoint, IClient flexClient) { _id = Guid.NewGuid().ToString("D"); _endpoint = endpoint; _flexClient = flexClient; _session = FluorineContext.Current.Session; if (_session != null) { _session.AddSessionDestroyedListener(this); } flexClient.RegisterEndpointPushHandler(this, endpoint.Id); }
/// <summary> /// Notification that a session was created. /// </summary> /// <param name="session">The session that was created.</param> public void SessionCreated(ISession session) { //We are only concerned in the session's destruction. session.AddSessionDestroyedListener(this); }