<feed xmlns='http://www.w3.org/2005/Atom'>
<title>cowboy.git/examples, branch 2.0.0-pre.9</title>
<subtitle>Small, fast, modern HTTP server for Erlang/OTP.
</subtitle>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/cowboy.git/'/>
<entry>
<title>Change the order of set_resp_cookie arguments</title>
<updated>2017-02-19T08:46:11+00:00</updated>
<author>
<name>Loïc Hoguin</name>
<email>essen@ninenines.eu</email>
</author>
<published>2017-02-19T08:46:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/cowboy.git/commit/?id=91ae70b06c9cc486ea2c2cf91b94de799ceb53b2'/>
<id>91ae70b06c9cc486ea2c2cf91b94de799ceb53b2</id>
<content type='text'>
The Opts value is put last, to be more consistent with the
rest of the cowboy_req module.

Additionally a test handler was fixed which reduced the number
of errors in http_SUITE.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The Opts value is put last, to be more consistent with the
rest of the cowboy_req module.

Additionally a test handler was fixed which reduced the number
of errors in http_SUITE.
</pre>
</div>
</content>
</entry>
<entry>
<title>Allow passing options to sub protocols</title>
<updated>2017-02-18T17:26:20+00:00</updated>
<author>
<name>Loïc Hoguin</name>
<email>essen@ninenines.eu</email>
</author>
<published>2017-02-18T17:26:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/cowboy.git/commit/?id=a45813c60f0f983a24ea29d491b37f0590fdd087'/>
<id>a45813c60f0f983a24ea29d491b37f0590fdd087</id>
<content type='text'>
Before this commit we had an issue where configuring a
Websocket connection was simply not possible without
doing magic, adding callbacks or extra return values.
The init/2 function only allowed setting hibernate
and timeout options.

After this commit, when switching to a different
type of handler you can either return

  {module, Req, State}

or

  {module, Req, State, Opts}

where Opts is any value (as far as the sub protocol
interface is concerned) and is ultimately checked
by the custom handlers.

A large protocol like Websocket would accept only
a map there, with many different options, while a
small interface like loop handlers would allow
passing hibernate and nothing else.

For Websocket, hibernate must be set from the
websocket_init/1 callback, because init/2 executes
in a separate process.

Sub protocols now have two callbacks: one with the
Opts value, one without.

The loop handler code was largely reworked and
simplified. It does not need to manage a timeout
or read from the socket anymore, it's the job of
the protocol code. A lot of unnecessary stuff was
therefore removed.

Websocket compression must now be enabled from
the handler options instead of per listener. This
means that a project can have two separate Websocket
handlers with different options. Compression is
still disabled by default, and the idle_timeout
value was changed from inifnity to 60000 (60 seconds),
as that's safer and is also a good value for mobile
devices.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before this commit we had an issue where configuring a
Websocket connection was simply not possible without
doing magic, adding callbacks or extra return values.
The init/2 function only allowed setting hibernate
and timeout options.

After this commit, when switching to a different
type of handler you can either return

  {module, Req, State}

or

  {module, Req, State, Opts}

where Opts is any value (as far as the sub protocol
interface is concerned) and is ultimately checked
by the custom handlers.

A large protocol like Websocket would accept only
a map there, with many different options, while a
small interface like loop handlers would allow
passing hibernate and nothing else.

For Websocket, hibernate must be set from the
websocket_init/1 callback, because init/2 executes
in a separate process.

Sub protocols now have two callbacks: one with the
Opts value, one without.

The loop handler code was largely reworked and
simplified. It does not need to manage a timeout
or read from the socket anymore, it's the job of
the protocol code. A lot of unnecessary stuff was
therefore removed.

Websocket compression must now be enabled from
the handler options instead of per listener. This
means that a project can have two separate Websocket
handlers with different options. Compression is
still disabled by default, and the idle_timeout
value was changed from inifnity to 60000 (60 seconds),
as that's safer and is also a good value for mobile
devices.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix and update the compress example to use cowboy_compress_h</title>
<updated>2017-01-22T19:17:52+00:00</updated>
<author>
<name>Loïc Hoguin</name>
<email>essen@ninenines.eu</email>
</author>
<published>2017-01-22T19:17:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/cowboy.git/commit/?id=3c198f7d90ee7b482ee00e66d12699dd645442e7'/>
<id>3c198f7d90ee7b482ee00e66d12699dd645442e7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix websocket example</title>
<updated>2016-08-22T07:44:42+00:00</updated>
<author>
<name>Witeman Zheng</name>
<email>witeman.g@icloud.com</email>
</author>
<published>2016-08-21T13:31:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/cowboy.git/commit/?id=b9ad02d3057e78ff82dacbd38042e33073c4bc75'/>
<id>b9ad02d3057e78ff82dacbd38042e33073c4bc75</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'master' of https://github.com/sergey-ivlev/cowboy</title>
<updated>2016-08-11T09:38:58+00:00</updated>
<author>
<name>Loïc Hoguin</name>
<email>essen@ninenines.eu</email>
</author>
<published>2016-08-11T09:38:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/cowboy.git/commit/?id=8fb4648b130ea66e394801b0afca657b2cd17610'/>
<id>8fb4648b130ea66e394801b0afca657b2cd17610</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix cookie example again</title>
<updated>2016-08-11T09:25:58+00:00</updated>
<author>
<name>Loïc Hoguin</name>
<email>essen@ninenines.eu</email>
</author>
<published>2016-08-11T09:25:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/cowboy.git/commit/?id=badc8d596eecb630c9e9a3e684966f2a17f7413b'/>
<id>badc8d596eecb630c9e9a3e684966f2a17f7413b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix timer-sent events in the websocket example</title>
<updated>2016-08-11T09:06:03+00:00</updated>
<author>
<name>Loïc Hoguin</name>
<email>essen@ninenines.eu</email>
</author>
<published>2016-08-11T09:06:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/cowboy.git/commit/?id=e2d5c268aa9dc7d37197560588fe9088741fb6d1'/>
<id>e2d5c268aa9dc7d37197560588fe9088741fb6d1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Make reply functions return Req</title>
<updated>2016-08-10T15:15:02+00:00</updated>
<author>
<name>Loïc Hoguin</name>
<email>essen@ninenines.eu</email>
</author>
<published>2016-08-10T15:15:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/cowboy.git/commit/?id=e30d120bd8c9a4a7b469937d5b5be6a8dfe148d4'/>
<id>e30d120bd8c9a4a7b469937d5b5be6a8dfe148d4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Update the multipart reading interface</title>
<updated>2016-08-10T13:09:04+00:00</updated>
<author>
<name>Loïc Hoguin</name>
<email>essen@ninenines.eu</email>
</author>
<published>2016-08-10T13:09:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/cowboy.git/commit/?id=aa6f2ab5a48d90e47648dfb53e0894dcaa6f6aac'/>
<id>aa6f2ab5a48d90e47648dfb53e0894dcaa6f6aac</id>
<content type='text'>
Now named read_part/read_part_body, with a verb indicating action.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now named read_part/read_part_body, with a verb indicating action.
</pre>
</div>
</content>
</entry>
<entry>
<title>Update examples to the new interface</title>
<updated>2016-08-10T12:33:43+00:00</updated>
<author>
<name>Loïc Hoguin</name>
<email>essen@ninenines.eu</email>
</author>
<published>2016-08-10T12:33:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/cowboy.git/commit/?id=ae95e87eb1c352b96b43a431fd4693d7d80a4b64'/>
<id>ae95e87eb1c352b96b43a431fd4693d7d80a4b64</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
