Returns the index of the [[enet.peer | peer]]. All [[enet.peer | peers]] of an ENet [[enet.host | host]] are kept in an array. This function finds and returns the index of the [[enet.peer | peer]] of its [[enet.host | host]] structure.
== Function ==
=== Synopsis ===
<source lang="lua">
peer:index()
</source>
=== Arguments ===
None.
=== Returns ===
{{param|number|index|The index of the peer.}}

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