This tutorial is meant to provide the user who has already some understanding in programming with the knowledge necessary to use the
LUA SocketLib
and the Coroutines in order to set up a TCP/IP server in a host application.
In our case, the host application is Demoniak3D
but the guiding principle remains worthwhile whatever the host application is.
As a part of Hyperion's core, the LUA SocketLib
provides high efficiency and maximise its usability. The SocketLib is a fantastic library which provides all we need and even more for handling
TCP-UPD/IP networking connections.
This library offers high level objects, such as TCP or UDP clients and servers as well as
FTP or HTTP protocoles.
In this tutorial, we will focus on the use of objects such as socket and TCP/IP servers provided by the SocketLib. Once the basic operations are mastered, using all the other
components of the library will almost be a piece of cake.
The coroutines are brand new features of LUA version 5.1 and will be used as examples for
managing the TCP/IP server.