Skip to content

Commit

Permalink
change dataTransmission unit.
Browse files Browse the repository at this point in the history
  • Loading branch information
hecomi committed Nov 28, 2021
1 parent 860baf3 commit 8b46888
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Assets/uOSC/Runtime/uOscClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class uOscClient : MonoBehaviour
[SerializeField]
public int maxQueueSize = 100;

[SerializeField]
[SerializeField, Tooltip("milliseconds")]
public float dataTransimissionInterval = 0f;

#if NETFX_CORE
Expand Down Expand Up @@ -111,7 +111,7 @@ void UpdateSend()

if (dataTransimissionInterval > 0f)
{
var ticks = Mathf.Round(dataTransimissionInterval * Stopwatch.Frequency);
var ticks = (long)Mathf.Round(dataTransimissionInterval * 1000f * Stopwatch.Frequency);
while (sw.ElapsedTicks < ticks);
}
}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ If the `port` or `address` of `uOscClient` / `uOscServer` is changed, the server

### Data transmission interval

If you need to send multiple large `byte[]` data at the same time, there are cases where you will lose packets frequently if you do not allow an interval. In this case, set `uOscClient.dataTransmissionInterval` (seconds). The background thread waits for the interval between each time a message is sent.
If you need to send multiple large `byte[]` data at the same time, there are cases where you will lose packets frequently if you do not allow an interval. In this case, set `uOscClient.dataTransmissionInterval` (milliseconds). The background thread waits for the interval between each time a message is sent.

### Maximum data size

Expand Down

0 comments on commit 8b46888

Please sign in to comment.