enet.peer:round trip time

enet.peer:round trip time

Returns or sets the current round trip time (i.e. ping). If value is nil the current value of the peer is returned. Otherwise the round trip time is set to the specified value and returned.

ENet performs some filtering on the round trip times and it takes some time until the parameters are accurate. To speed it up, set the last round trip time to an accurate guess.

Function

Synopsis

peer:round_trip_time()

Arguments

None.

Returns

number roundtriptime
The peer's current round trip time in milliseconds.

Synopsis

peer:round_trip_time(value)

Arguments

number value
Integer value to be used as the new round trip time.

Returns

Nothing.

See Also

© 2006–2016 LÖVE Development Team
Licensed under the GNU Free Documentation License, Version 1.3.
https://love2d.org/wiki/enet.peer:round_trip_time

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部