enet.host:channel limit

enet.host:channel limit Sets the maximum number of channels allowed. If it is 0 then the system maximum allowable value is used. Function Synopsis host:channel_limit(limit) Arguments number limit The maximum number of channels allowed. Returns Nothing. See Also lua-enet enet.host

enet.host:broadcast

enet.host:broadcast Queues a packet to be sent to all connected peers. Function Synopsis host:broadcast(data, channel, flag) Arguments string data The data to send. number channel The channel to send the packet on. 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 guaranteed to arrive. U

enet.host create

enet.host create Returns a new host. All arguments are optional. A bind_address of nil makes a host that can not be connected to (typically a client). Otherwise the address can either be of the form <ipaddress>:<port>, <hostname>:<port>, or *:<port>. Example addresses include "127.0.0.1:8888", "localhost:2232", and "*:6767". Function Synopsis host = enet.host_create(bind_address, peer_count, channel_count, in_bandwidth, out_bandwidth) Arguments string bind_add

enet.host:bandwidth limit

enet.host:bandwidth limit Sets the bandwidth limits of the host in bytes/sec. Set to 0 for unlimited. Function Synopsis host:bandwidth_limit(incoming, outgoing) Arguments number incoming Download speed limit in bytes/sec. number outgoing Upload speed limit in bytes/sec. Returns Nothing. See Also lua-enet enet.host

enet.host

enet.host Description An ENet host for communicating with peers. On creation it will bind to a port on an address, unless otherwise specified, which will keep other applications from binding to the same port and address. One can free the port by calling its destroy method; nil-ing the host object and calling collectgarbage() would work as well, since :destroy calls host:__gc internally, but this is cleaner: local host = enet.host_create("*:6789") host:destroy() Functions Function Description

enet.event

enet.event Description An event is a table generated by host:service() or peer:recieve() which will always contain a string named type, a enet.peer named peer, and a string or number named data depending on the kind of event. Though be wary that host:service() and peer:recieve() can return nil if no events are in the queue. Structure event.type event.peer event.data "receive" peer string "disconnect" peer number "connect" peer number See Also lua-enet enet.host:

EdgeShape:setPreviousVertex

EdgeShape:setPreviousVertex Available since LÖVE 0.10.2 This function is not supported in earlier versions. Sets a vertex that establishes a connection to the previous shape. This can help prevent unwanted collisions when a flat shape slides along the edge and moves over to the new shape. Function Synopsis EdgeShape:setPreviousVertex( x, y ) Arguments number x The x-component of the vertex. number y The y-component of the vertex. Returns Nothing. See Also EdgeShape EdgeShape:getPr

EdgeShape:setNextVertex

EdgeShape:setNextVertex Available since LÖVE 0.10.2 This function is not supported in earlier versions. Sets a vertex that establishes a connection to the next shape. This can help prevent unwanted collisions when a flat shape slides along the edge and moves over to the new shape. Function Synopsis EdgeShape:setNextVertex( x, y ) Arguments number x The x-component of the vertex. number y The y-component of the vertex. Returns Nothing. See Also EdgeShape EdgeShape:getNextVertex E

EdgeShape:getPreviousVertex

EdgeShape:getPreviousVertex Available since LÖVE 0.10.2 This function is not supported in earlier versions. Gets the vertex that establishes a connection to the previous shape. Setting next and previous EdgeShape vertices can help prevent unwanted collisions when a flat shape slides along the edge and moves over to the new shape. Function Synopsis x, y = EdgeShape:getPreviousVertex( ) Arguments None. Returns number x (nil) The x-component of the vertex, or nil if EdgeShape:setPreviousVe

EdgeShape:getPoints

EdgeShape:getPoints Available since LÖVE 0.8.0 This method is not supported in earlier versions. Returns the local coordinates of the edge points. Function Synopsis x1, y1, x2, y2 = EdgeShape:getPoints( ) Arguments None. Returns number x1 The x-component of the first vertex. number y1 The y-component of the first vertex. number x2 The x-component of the second vertex. number y2 The y-component of the second vertex. See Also EdgeShape