• Stars
    star
    197
  • Rank 191,059 (Top 4 %)
  • Language
    Lua
  • License
    MIT License
  • Created over 14 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Copas is a dispatcher based on coroutines that can be used by TCP/IP servers.

Copas 4.7

Unix build Coveralls code coverage Luacheck SemVer Licence

Copas is a dispatcher based on coroutines that can be used for asynchronous networking. For example TCP or UDP based servers. But it also features timers and client support for http(s), ftp and smtp requests.

It uses LuaSocket as the interface with the TCP/IP stack and LuaSec for ssl support.

A server or thread registered with Copas should provide a handler for requests and use Copas socket functions to send the response. Copas loops through requests and invokes the corresponding handlers. For a full implementation of a Copas HTTP server you can refer to Xavante as an example.

Copas is free software and uses the same license as Lua (MIT), and can be downloaded from its GitHub page.

The easiest way to install Copas is through LuaRocks:

luarocks install copas

For more details see the documentation.

Releasing a new version

  • update changelog in docs (index.html, update history and status sections)
  • update version in copas.lua
  • update version at the top of this README,
  • update copyright years if needed
  • update rockspec
  • commit as release X.Y.Z
  • tag as vX_Y_Z and as X.Y.Z
  • push commit and tag
  • upload to luarocks
  • test luarocks installation

More Repositories

1

Penlight

A set of pure Lua libraries focusing on input data handling (such as reading configuration files), functional programming (such as map, reduce, placeholder expressions,etc), and OS path management. Much of the functionality is inspired by the Python standard libraries.
Lua
1,790
star
2

luasocket

Network support for the Lua language
HTML
1,736
star
3

busted

Elegant Lua unit testing.
Lua
1,316
star
4

luafilesystem

LuaFileSystem is a Lua library developed to complement the set of functions related to file systems offered by the standard Lua distribution.
C
854
star
5

ldoc

LDoc is a LuaDoc-compatible documentation generator which can also process C extension source. Markdown may be optionally used to render comments, as well as integrated readme documentation and pretty-printed example files.
Lua
737
star
6

luasql

LuaSQL is a simple interface from Lua to a DBMS.
Lua
521
star
7

luasec

LuaSec
C
353
star
8

luacov

LuaCov is a simple coverage analyzer for Lua code.
Lua
290
star
9

lua-compat-5.3

Compatibility module providing Lua-5.3-style APIs for Lua 5.2 and 5.1
C
216
star
10

luassert

Assertion library for Lua
Lua
191
star
11

lua_cliargs

A command-line argument parsing module for Lua.
Lua
113
star
12

md5

MD5 offers basic cryptographic facilities for Lua 5.1.
C
108
star
13

cgilua

CGILua is a tool for creating dynamic HTML pages and manipulating input data from Web forms.
Lua
92
star
14

lua-iconv

Lua bindings for POSIX iconv
Lua
88
star
15

lualogging

A simple API to use logging features in Lua
Lua
44
star
16

say

Lua string hashing library, useful for internationalization
Lua
37
star
17

luaexpat

LuaExpat is a SAX XML parser based on the Expat library
Lua
20
star
18

luasystem

Platform independent system calls for Lua
C
15
star
19

luasyslog

Addon for lualogging to log to the system log on unix systems
Lua
5
star
20

lua-mimetypes

fixed repo of https://luarocks.org/modules/luarocks/mimetypes
Lua
3
star
21

lunarmodules

providing the profile page (README.md) for the Lunar Modules organization
2
star
22

moon-sand

Sandbox to mess with CIβ€Œ deployments using LunarModules CI key(s)
Lua
1
star
23

expadom

An XML DOM Level 2 Core implementation in Lua, based on the (Lua)Expat parser.
Lua
1
star
24

.github

Lunarmodules profile page and reusable workflows
1
star
25

lua-lace

Lua Access Control Engine
Lua
1
star