Returns the state of the [[enet.peer | peer]] as a [[string]].
== Function ==
=== Synopsis ===
<source lang="lua">
peer:state()
</source>
=== Arguments ===
None.
=== Returns ===
{{param|string|state|The [[enet.peer | 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 ==
* [[parent::lua-enet]]
* [[enet.peer]]
== Other Languages ==
{{i18n|enet.peer:state}}