Client Server Tutorial (Neko)

Here's a small Client/Server Application that demonstrate the use of the class neko.net.Socket.

The Client :























The Server :

The HXML file to build the two projects :



You can compile using the following command :

Then open two terminals, in the first one you can start the server by running :

And in the second one you can start a client by running :

The server is sending to the client some datas that the client is printing, and when "exit" is received, the client exit and the server wait another client.

Multiple Clients
If you want to be able to talk to several clients at the same time you can either the use neko.net.Socket.select method for multiplexing and/or the /api/neko/vm/Thread api to create multiple running threads.

See also the /doc/flash/chat