LanLobbyBrowser - stingray.LanLobbyBrowser object reference - Stingray Lua API Reference
The LanLobbyBrowser provides access to the list of game lobbies available on the local area network (LAN).
Call refresh() to refresh the list.
Call num_lobbies() to get the number of available lobbies, and call lobby() to retrieve detailed
information about each of those lobbies. You can use these details to determine if you want to join
the lobby, and the IP address and port needed in order to connect.
|
Indicates whether or not the lobby browser is currently refreshing its internal list of available lobbies on the LAN.
|
Parameters self : | stingray.LanLobbyBrowser | Specifies the object instance that this function will act on. You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation. |
Returns boolean |
Returns true if the lobby browser is currently refreshing its list, or false
otherwise.
|
If this function returns true, calling refresh() will have no effect.
|
lobby ( self, index ) : network_lan_lobby_info
Returns details about the specified lobby, including the IP address and port that you must use to connect to the lobby.
|
Parameters self : | stingray.LanLobbyBrowser | Specifies the object instance that this function will act on. You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation. |
index : | integer | The index number of the lobby to retrieve from the list maintained by the lobby browser. |
Returns
|
Returns the number of available lobbies found in the last search of the LAN.
|
Parameters self : | stingray.LanLobbyBrowser | Specifies the object instance that this function will act on. You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation. |
Returns integer |
The number of available lobbies.
|
|
Refreshes the list of available game lobbies by broadcasting a search on the LAN.
|
Parameters self : | stingray.LanLobbyBrowser | Specifies the object instance that this function will act on. You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation. |
port : | number | The port number that the network broadcast should search on. |
Returns | This function does not return any values. |
The search will only find LAN Lobbies configured to use a matching port number.
You can't refresh more than once every 3 seconds. If the list has been refreshed less than three seconds
ago, or if the list is currently being refreshed (see is_refreshing()), calling refresh()
will have no effect.