Copas
Copas
Coroutine Oriented Portable Asynchronous Services for Lua
overview · download · news · reference · examples

Contents

Overview

Copas offers a dispatcher based on coroutines that can be used by socket request/response server programs. A server registered with Copas should provide a handler for requests and use Copas socket functions to send the response.

Since Copas is coroutine based, using it within a pcall or xpcall context does not work with Lua 5.0 yielding. If you need to use those functions we strongly suggest using Xavante's coxpcall, a coroutine safe version of the Lua 5.0 protected calls.

Copas follows the package proposal for Lua 5.1, therefore this package should be "installed". In other words, if you are using Lua 5.0, the file compat-5.1.lua must be installed in the LUA_PATH. If you are using Lua 5.1, nothing should be done.

Copas is free software and uses the same license as Lua 5.0.

Current version

Current version is 1.0 Beta. It was developed for Lua 5.0 and Lua 5.1.

Download

Copas can be downloaded from its LuaForge page.

What's new

Reference

Copas functions are separated in two groups. The first one is relative to the use of the dispatcher:

The second group is used by the handlers to exchange data with clients:

Examples

(to do)

Credits

Copas was designed and implemented by André Carregal and Javier Guerra as part of the Kepler Project which holds its copyright. Copas development had significative contributions from Diego Nehab, Mike Pall and David Burgess

Contact us

For more information please contact us. Comments are welcome!


$Id: index.html,v 1.7 2005/02/18 21:12:26 carregal Exp $