Difference between revisions of "enet.host:destroy"

m (Zorg moved page enet.host: gc to enet.host:destroy: slime said so :P Also, people should use an exposed method, instead of tricks to free ports.)
(Fixed the page up a bit, also i18n points to correct page now.)
Line 1: Line 1:
 
Destroys the [[enet.host | host]] structure and closes all of its connections.
 
Destroys the [[enet.host | host]] structure and closes all of its connections.
Do not call this directly!
+
This function is also ran automatically by lua's garbage collector, since it's an alias to ''host:__gc''.
This function is ran automatically by lua's garbage collector, but can be invoked indirectly by running collectgarbage() when all references to the [[enet.host | host]] are set to nil or are otherwise lost.
 
 
== Function ==
 
== Function ==
 
=== Synopsis ===
 
=== Synopsis ===
 
<source lang="lua">
 
<source lang="lua">
host:__gc()
+
host:destroy()
 
</source>
 
</source>
 
=== Arguments ===
 
=== Arguments ===
Line 16: Line 15:
 
* [[enet.host]]
 
* [[enet.host]]
 
== Other Languages ==
 
== Other Languages ==
{{i18n|enet.host:channel_limit}}
+
{{i18n|enet.host:destroy}}

Revision as of 01:59, 30 October 2016

Destroys the host structure and closes all of its connections. This function is also ran automatically by lua's garbage collector, since it's an alias to host:__gc.

Function

Synopsis

host:destroy()

Arguments

None

Returns

None

See Also

Other Languages