aboutsummaryrefslogtreecommitdiffstats
path: root/doc/src/guide/modern_web.asciidoc
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2017-09-04 14:33:44 +0200
committerLoïc Hoguin <[email protected]>2017-09-04 14:33:44 +0200
commit58e9e76814a8291894ba01ac8a4551e4f8d480b3 (patch)
tree58145af48e5c9dbcec51ffec14bb9faea25c6b24 /doc/src/guide/modern_web.asciidoc
parent47aa0097ed3f63bf0de1b540a6a8d4086e3d2ea6 (diff)
downloadcowboy-58e9e76814a8291894ba01ac8a4551e4f8d480b3.tar.gz
cowboy-58e9e76814a8291894ba01ac8a4551e4f8d480b3.tar.bz2
cowboy-58e9e76814a8291894ba01ac8a4551e4f8d480b3.zip
Fix more documentation todos
I have decided not to include a manual page for cowboy_stream_h at this point because it clashes with the cowboy_stream manual page. This decision will be revisited in the future.
Diffstat (limited to 'doc/src/guide/modern_web.asciidoc')
-rw-r--r--doc/src/guide/modern_web.asciidoc25
1 files changed, 13 insertions, 12 deletions
diff --git a/doc/src/guide/modern_web.asciidoc b/doc/src/guide/modern_web.asciidoc
index 6c43adb..4852573 100644
--- a/doc/src/guide/modern_web.asciidoc
+++ b/doc/src/guide/modern_web.asciidoc
@@ -1,8 +1,6 @@
[[modern_web]]
== The modern Web
-// @todo Link to related xrefs.
-
Cowboy is a server for the modern Web. This chapter explains
what it means and details all the standards involved.
@@ -56,9 +54,9 @@ methods, status codes, headers or semantics.
=== Websocket
-Websocket is a protocol built on top of HTTP/1.1 that provides
-a two-ways communication channel between the client and the
-server. Communication is asynchronous and can occur concurrently.
+xref:ws_protocol[Websocket] is a protocol built on top of HTTP/1.1
+that provides a two-ways communication channel between the client and
+the server. Communication is asynchronous and can occur concurrently.
It consists of a Javascript object allowing setting up a
Websocket connection to the server, and a binary based
@@ -79,6 +77,9 @@ is closer to TCP in that aspect, and requires you to design
and implement your own protocol on top of it; or adapt an
existing protocol to Websocket.
+Cowboy provides an interface known as xref:ws_handlers[Websocket handlers]
+that gives complete control over a Websocket connection.
+
The Websocket protocol is defined by RFC 6455.
=== Long-lived requests
@@ -101,21 +102,21 @@ type, `text/event-stream`, along with a new HTTP header,
`Last-Event-ID`. It is defined in the EventSource W3C
specification.
-Cowboy provides an interface known as loop handlers that
-facilitates the implementation of long-polling or stream
+Cowboy provides an interface known as xref:loop_handlers[loop handlers]
+that facilitates the implementation of long-polling or stream
mechanisms. It works regardless of the underlying protocol.
=== REST
-REST, or REpresentational State Transfer, is a style of
-architecture for loosely connected distributed systems.
-It can easily be implemented on top of HTTP.
+xref:rest_principles[REST, or REpresentational State Transfer],
+is a style of architecture for loosely connected distributed
+systems. It can easily be implemented on top of HTTP.
REST is essentially a set of constraints to be followed.
Many of these constraints are purely architectural and
solved by simply using HTTP. Some constraints must be
explicitly followed by the developer.
-Cowboy provides an interface known as REST handlers that
-simplifies the implementation of a REST API on top of
+Cowboy provides an interface known as xref:rest_handlers[REST handlers]
+that simplifies the implementation of a REST API on top of
the HTTP protocol.