<feed xmlns='http://www.w3.org/2005/Atom'>
<title>cowboy.git/examples/eventsource, branch http3</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>Update Erlang.mk</title>
<updated>2022-09-19T12:17:37+00:00</updated>
<author>
<name>Loïc Hoguin</name>
<email>essen@ninenines.eu</email>
</author>
<published>2022-09-19T12:17:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/cowboy.git/commit/?id=30ee75cea14c1fd63a46093cfb2bb9ad3f844f75'/>
<id>30ee75cea14c1fd63a46093cfb2bb9ad3f844f75</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Document stopping the listener in App:stop/1</title>
<updated>2019-10-03T08:09:35+00:00</updated>
<author>
<name>Loïc Hoguin</name>
<email>essen@ninenines.eu</email>
</author>
<published>2019-10-03T08:09:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/cowboy.git/commit/?id=99df823cc32fed641c15722e22e8d6a5969a77c6'/>
<id>99df823cc32fed641c15722e22e8d6a5969a77c6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename handler modules to _h</title>
<updated>2018-09-23T12:12:38+00:00</updated>
<author>
<name>Herman Singh</name>
<email>kartstig@gmail.com</email>
</author>
<published>2018-09-07T17:48:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/cowboy.git/commit/?id=86cb105679ff80214bfc9d979afa27b1eb747307'/>
<id>86cb105679ff80214bfc9d979afa27b1eb747307</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Use cowboy_req:stream_events in the eventsource example</title>
<updated>2018-06-27T11:50:37+00:00</updated>
<author>
<name>Loïc Hoguin</name>
<email>essen@ninenines.eu</email>
</author>
<published>2018-06-27T11:50:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/cowboy.git/commit/?id=6b1db885d1b07f675e00daa641eeae2e36dbb1ba'/>
<id>6b1db885d1b07f675e00daa641eeae2e36dbb1ba</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove NumAcceptors argument from start_clear/tls</title>
<updated>2017-06-07T13:15:54+00:00</updated>
<author>
<name>Loïc Hoguin</name>
<email>essen@ninenines.eu</email>
</author>
<published>2017-06-07T13:15:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/cowboy.git/commit/?id=6f7b59886ec17027b16ed4d10737452e17f233d0'/>
<id>6f7b59886ec17027b16ed4d10737452e17f233d0</id>
<content type='text'>
They are now cowboy:start_clear/3 and cowboy:start_tls/3.
The NumAcceptors argument can be specified via the
num_acceptor transport option. Ranch has been updated
to 1.4.0 to that effect.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
They are now cowboy:start_clear/3 and cowboy:start_tls/3.
The NumAcceptors argument can be specified via the
num_acceptor transport option. Ranch has been updated
to 1.4.0 to that effect.
</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>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 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>
<entry>
<title>Fix eventsource example</title>
<updated>2016-06-14T15:05:41+00:00</updated>
<author>
<name>Loïc Hoguin</name>
<email>essen@ninenines.eu</email>
</author>
<published>2016-06-14T15:05:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/cowboy.git/commit/?id=5003bae369901a6c771075ac4ef600d49b019570'/>
<id>5003bae369901a6c771075ac4ef600d49b019570</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Simplify specifying the Cowboy version in examples</title>
<updated>2016-01-14T21:58:22+00:00</updated>
<author>
<name>Loïc Hoguin</name>
<email>essen@ninenines.eu</email>
</author>
<published>2016-01-14T21:58:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/cowboy.git/commit/?id=ec82e3548b2cd111b270d0355c5a42a9b1f492a4'/>
<id>ec82e3548b2cd111b270d0355c5a42a9b1f492a4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
