0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 12:20:24 +00:00
Small, fast, modern HTTP server for Erlang/OTP.
Find a file
Loïc Hoguin 0dc063ab7d Improve handler interface and documentation
This change simplifies a little more the sub protocols mechanism.
Aliases have been removed. The renaming of loop handlers as long
polling handlers has been reverted.

Plain HTTP handlers now simply do their work in the init/2
callback. There is no specific code for them.

Loop handlers now follow the same return value as Websocket,
they use ok to continue and shutdown to stop.

Terminate reasons for all handler types have been documented.
The terminate callback is now appropriately called in all cases
(or should be).

Behaviors for all handler types have been moved in the module
that implement them. This means that cowboy_handler replaces
the cowboy_http_handler behavior, and similarly cowboy_loop
replaces cowboy_loop_handler, cowboy_websocket replaces
cowboy_websocket_handler. Finally cowboy_rest now has the
start of a behavior in it and will have the full list of
optional callbacks defined once Erlang 18.0 gets released.

The guide has been reorganized and should be easier to follow.
2014-09-30 20:12:13 +03:00
doc/src Improve handler interface and documentation 2014-09-30 20:12:13 +03:00
examples Improve handler interface and documentation 2014-09-30 20:12:13 +03:00
src Improve handler interface and documentation 2014-09-30 20:12:13 +03:00
test Improve handler interface and documentation 2014-09-30 20:12:13 +03:00
.gitignore Provide installable man pages 2014-07-06 13:10:35 +02:00
all.sh Update to erlang.mk 1.0.0 2014-08-01 14:26:51 +02:00
AUTHORS Update AUTHORS 2014-08-01 14:31:46 +02:00
CHANGELOG.md Update CHANGELOG 2014-08-01 14:40:33 +02:00
CONTRIBUTING.md Add note about SSL tests requiring R16B01 2013-08-31 10:24:11 +02:00
erlang.mk Update links extend -> ninenines 2014-08-02 12:38:15 +02:00
LICENSE Update copyright years 2014-02-06 19:57:23 +01:00
Makefile Update to erlang.mk 1.0.0 2014-08-01 14:26:51 +02:00
README.md Provide installable man pages 2014-07-06 13:10:35 +02:00
rebar.config Update links extend -> ninenines 2014-08-02 12:38:15 +02:00
ROADMAP.md Unify the init and terminate callbacks 2014-09-26 15:58:44 +03:00

Cowboy

Cowboy is a small, fast and modular HTTP server written in Erlang.

Goals

Cowboy aims to provide a complete HTTP stack in a small code base. It is optimized for low latency and low memory usage, in part because it uses binary strings.

Cowboy provides routing capabilities, selectively dispatching requests to handlers written in Erlang.

Because it uses Ranch for managing connections, Cowboy can easily be embedded in any other application.

No parameterized module. No process dictionary. Clean Erlang code.

Sponsors

The SPDY implementation was sponsored by LeoFS Cloud Storage.

The project is currently sponsored by Kato.im.

Online documentation

Offline documentation

  • While still online, run make docs
  • Function reference man pages available in doc/man3/ and doc/man7/
  • Run make install-docs to install man pages on your system
  • Full documentation in Markdown available in doc/markdown/
  • Examples available in examples/

Getting help