TNet 3  3.0.8
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros
ImproveLatency Class Reference

This simple example script shows how to improve latency in a scene by disabling the Nagle's buffering algorithm. If you run Example 3 on a mobile device using only TCP and without this script, other players may notice that the mobile player is "lagging". This is because by default the buffering algorithm is on, and seems to be overly aggressive on some devices. For games that require quick response times, turning on "improveLatency" flag will improve performance. http://en.wikipedia.org/wiki/Nagle's_algorithm More...

Inheritance diagram for ImproveLatency:

Public Types

enum  Target { Target.OnlyOnMobiles, Target.Everywhere }
 

Public Attributes

Target target = Target.OnlyOnMobiles
 

Detailed Description

This simple example script shows how to improve latency in a scene by disabling the Nagle's buffering algorithm. If you run Example 3 on a mobile device using only TCP and without this script, other players may notice that the mobile player is "lagging". This is because by default the buffering algorithm is on, and seems to be overly aggressive on some devices. For games that require quick response times, turning on "improveLatency" flag will improve performance. http://en.wikipedia.org/wiki/Nagle's_algorithm

Note that using UDP for frequently sent data is usually a better approach than turning on 'noDelay'. For more information, look at how TNObject's SendQuickly function is used in the DraggedObject script.

Member Enumeration Documentation

Enumerator
OnlyOnMobiles 
Everywhere 

Member Data Documentation

Target ImproveLatency.target = Target.OnlyOnMobiles

The documentation for this class was generated from the following file: