Requests a disconnection from the [[enet.peer | peer]]. The message is sent on the next [[enet.host:service | host:service()]] or [[enet.host:flush | host:flush()]].

== Function ==
=== Synopsis ===
<source lang="lua">
peer:disconnect(data)
</source>
=== Arguments ===
{{param|number|data|An optional integer value to be associated with the disconnect.}}
=== Returns ===
Nothing.

== See Also ==
* [[parent::lua-enet]]
* [[enet.host]]
* [[enet.host:flush]]
* [[enet.host:service]]
* [[enet.peer]]
== Other Languages ==
{{i18n|enet.peer:disconnect}}