{"_id":"595457ee50f061001b74059f","project":"55f0757d4624ec2d00814345","version":{"_id":"593878f2682adc0031784bf3","project":"55f0757d4624ec2d00814345","__v":1,"createdAt":"2017-06-07T22:06:42.610Z","releaseDate":"2017-06-07T22:06:42.610Z","categories":["593878f2682adc0031784bf4","593878f2682adc0031784bf5","593878f2682adc0031784bf6","593878f2682adc0031784bf7","593878f2682adc0031784bf8","593878f2682adc0031784bf9","593878f2682adc0031784bfa","593878f2682adc0031784bfb"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"3.0.0","version":"3"},"category":{"_id":"593878f2682adc0031784bf5","version":"593878f2682adc0031784bf3","project":"55f0757d4624ec2d00814345","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-09-09T21:17:41.905Z","from_sync":false,"order":1,"slug":"tigerconnect-basics","title":"Basics"},"user":"55f0756a1e63fc37004b8d2b","__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-06-29T01:29:18.426Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":999,"body":"TigerText uses Server Sent Events (SSE) to notify clients in real-time of any relevant updates.  Events include new messages, an updated status for a sent message, an update to a user in the roster, and various other event types.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Event Stream\"\n}\n[/block]\nThe Event Stream is the main channel to receive various server events which include new messages, updates to groups, updates to metadata and many of the other dynamic elements of the platform.  See the [/events](doc:events) documentation regarding the various Event types.  \n\nAfter logging in, clients will connect to the event stream to start processing events which include all the existing messages for that particular user.  As each event is received, it is up to the client to acknowledge them.  If Events are not acknowledged, they will continue to be delivered by the platform as it continues to retry until acknowledged.  \n\nConnecting to the Event Stream is what designates whether the user is marked as \"Present\" or not.  The presence indicator is a powerful user experience element that can signal active use of the application.  \n\nFinally, for housekeeping, stale Event Streams are automatically disconnected by the Platform after 7 minutes.  The client will receive an Event when this happens and can choose to reconnect if necessary.\n\nLogging out completes a few housekeeping items for each client.  \n\n1.  Closes the Event Stream connection to the platform.  No more messages and events will get pushed to the associated device.\n\n2.  Removes any user key and secret that may have been generated at login time and invalidates it for further use.  \n\nAs part of the logging out, the client will need to remember to remove all local persisted messages and information for security purposes.  Again, we highly recommend the SDK to take care of this so you won't have to.","excerpt":"","slug":"events-2","type":"basic","title":"Events"}
TigerText uses Server Sent Events (SSE) to notify clients in real-time of any relevant updates. Events include new messages, an updated status for a sent message, an update to a user in the roster, and various other event types. [block:api-header] { "type": "basic", "title": "Event Stream" } [/block] The Event Stream is the main channel to receive various server events which include new messages, updates to groups, updates to metadata and many of the other dynamic elements of the platform. See the [/events](doc:events) documentation regarding the various Event types. After logging in, clients will connect to the event stream to start processing events which include all the existing messages for that particular user. As each event is received, it is up to the client to acknowledge them. If Events are not acknowledged, they will continue to be delivered by the platform as it continues to retry until acknowledged. Connecting to the Event Stream is what designates whether the user is marked as "Present" or not. The presence indicator is a powerful user experience element that can signal active use of the application. Finally, for housekeeping, stale Event Streams are automatically disconnected by the Platform after 7 minutes. The client will receive an Event when this happens and can choose to reconnect if necessary. Logging out completes a few housekeeping items for each client. 1. Closes the Event Stream connection to the platform. No more messages and events will get pushed to the associated device. 2. Removes any user key and secret that may have been generated at login time and invalidates it for further use. As part of the logging out, the client will need to remember to remove all local persisted messages and information for security purposes. Again, we highly recommend the SDK to take care of this so you won't have to.