FileData:getFilename

FileData:getFilename Available since LÖVE 0.7.0 This function is not supported in earlier versions. Gets the filename of the FileData. Function Synopsis name = FileData:getFilename( ) Arguments None. Returns string name The name of the file the FileData represents. See Also FileData

FileData:getExtension

FileData:getExtension Available since LÖVE 0.7.0 This function is not supported in earlier versions. Gets the extension of the FileData. Function Synopsis ext = FileData:getExtension( ) Arguments None. Returns string ext The extension of the file the FileData represents. See Also FileData

enet.peer:timeout

enet.peer:timeout Returns or sets the parameters when a timeout is detected. This is happens either after a fixed timeout or a variable timeout of time that takes the round trip time into account. The former is specified with the maximum parameter. Function Synopsis peer:timeout(limit, minimum, maximum) Arguments number limit A factor that is multiplied with a value that based on the average round trip time to compute the timeout limit. number minimum Timeout value, in milliseconds, that a

enet.peer:throttle configure

enet.peer:throttle configure Changes the probability at which unreliable packets should not be dropped. Function Synopsis peer:throttle_configure(interval, acceleration, deceleration) Arguments number interval Interval in milliseconds to measure lowest mean RTT. number acceleration Rate at which to increase throttle probability as mean RTT declines. number deceleration Rate at which to decrease throttle probability as mean RTT increases. Returns Nothing. See Also lua-enet enet.peer

enet.peer:state

enet.peer:state Returns the state of the peer as a string. Function Synopsis peer:state() Arguments None. Returns string state The peer's current state. It can be any of the following: "disconnected" "connecting" "acknowledging_connect" "connection_pending" "connection_succeeded" "connected" "disconnect_later" "disconnecting" "acknowledging_disconnect" "zombie" "unknown" See Also lua-enet enet.peer

enet.peer:send

enet.peer:send Queues a packet to be sent to the peer. Function Synopsis peer:send(data, channel, flag) Arguments string data The contents of the packet, it must be a string. number channel The channel to send the packet on. Optional. Defaults to 0. string flag flag is one of "reliable", "unsequenced", or "unreliable". Reliable packets are guaranteed to arrive, and arrive in the order in which they are sent. Unreliable packets arrive in the order in which they are sent, but they aren't gua

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 c

enet.peer:reset

enet.peer:reset Forcefully disconnects peer. The peer is not notified of the disconnection. Function Synopsis peer:reset() Arguments None. Returns Nothing. See Also lua-enet enet.peer

enet.peer:receive

enet.peer:receive Attempts to dequeue an incoming packet for this peer. Returns nil if there are no packets waiting. Otherwise returns two values: The string representing the packet data, and the channel the packet came from. Function Synopsis peer:receive() Arguments None. Returns string data Data from the received packet in a string. number channel Channel the packet was received from. See Also lua-enet enet.peer

enet.peer:ping interval

enet.peer:ping interval Specifies the interval in milliseconds that pings are sent to the other end of the connection (defaults to 500). Function Synopsis peer:ping_interval(interval) Arguments number interval Time in milliseconds to wait before automatically calling peer:ping(). Returns Nothing. See Also lua-enet enet.peer enet.peer:ping