0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-15 12:40:25 +00:00
Commit graph

25 commits

Author SHA1 Message Date
Loïc Hoguin
961526d704 Improve the Cowboy definition in the README 2011-09-13 23:10:41 +02:00
Loïc Hoguin
2374aa7e07 Add WebSocket drafts 7, 8, 9 and 10 implementation
The implementation is only partial for now but should work for
all browsers implementing it.
2011-08-23 23:49:58 +02:00
Loïc Hoguin
cd06efeba3 Add Transport:setopts/2 note for writing protocols 2011-08-11 09:46:39 +02:00
Loïc Hoguin
43d14b52cd Give the ListenerPid to the protocol on startup
Also sends a message 'shoot' that can be received by the protocol
to make sure Cowboy has had enough time to fully initialize the
socket. This message should be received before any socket-related
operations are performed.

WebSocket request connections are now moved from the pool 'default'
to the pool 'websocket', meaning we can have a lot of running
WebSockets despite having a low 'max_connections' setting.
2011-08-10 20:28:30 +02:00
Loïc Hoguin
293cf33702 Separate message and packet handling for websockets
Improves the readability of websocket handler code by having
two functions: websocket_handle/3 handles the packets received
from the socket, removing the tuple construct that was otherwise
needed, so only websocket_handle(Data, Req, State) is needed now;
websocket_info/3 handles the messages that the websocket handler
process received, as websocket_info(Info, Req, State).

Both functions return values are handled identically by Cowboy
so nothing changes on that end.
2011-07-19 12:20:16 +02:00
Loïc Hoguin
2b3bfdd783 Add a link to cowboy_examples in the README 2011-06-30 14:04:06 +02:00
Loïc Hoguin
548a9a15b8 README: Grammar fixes.
Thanks Mewn!
2011-05-16 12:36:52 +02:00
Anthony Ramine
4e09d776f5 Document the path info feature 2011-05-16 11:39:03 +02:00
Loïc Hoguin
39513deaca Removed a few lines from the README for pedantic correctness. 2011-05-07 16:22:19 +02:00
Anthony Ramine
cd737847cf Improve README 2011-05-07 16:11:06 +02:00
Loïc Hoguin
5a7b7429ff Greatly improve the README.
Forward me any more questions and I'll continue on improving it.
2011-05-07 12:46:23 +02:00
Loïc Hoguin
0fa5f71232 Merge pull request #5 from yrashk/patch-1.
README: added a mentioning of agner dependencies mechanism
2011-04-30 13:32:37 -07:00
Yurii Rashkovskii
cf6a506385 README: added a mentioning of agner dependencies mechanism 2011-04-30 12:20:36 -07:00
Anthony Ramine
2c21f0cd09 Use syntax highlighted code block in README.md
GitHub just implemented that and we should use it.
https://github.com/blog/832-rolling-out-the-redcarpet
2011-04-30 12:32:43 +02:00
Loïc Hoguin
44f0eecdcf Fix a grammar error reported by DeadZen on IRC. 2011-04-03 15:45:55 +02:00
Loïc Hoguin
718baffa3c Make Cowboy an OTP application again, properly this time.
As requested by many people on IRC Cowboy is now a proper OTP application
to support soft code upgrades. It should also be easier to start and stop
listeners now using cowboy:start_listener/6 and cowboy:stop_listener/1.
2011-04-03 00:21:47 +02:00
Loïc Hoguin
e4da6956fc Anonymize and improve the cowboy supervision tree.
* Cowboy isn't an OTP application anymore; just a supervisor.
* All processes started by Cowboy are now anonymous.
* All processes related to a listener are now part of its supervision tree.
2011-04-02 20:27:16 +02:00
Loïc Hoguin
7888be00d2 Forward transport and protocol name to Handler:init. 2011-03-22 19:50:02 +01:00
Loïc Hoguin
c4d4b6a051 Rename the title for Getting Started in the README. 2011-03-20 14:15:58 +01:00
Loïc Hoguin
2c52a30b0a Rewrite the dispatcher to take a list of host each having a list of paths.
* Makes more sense to parse the host only once instead of for each path.
* Allows proper handling of: If the host is not a valid host on the server,
  the response MUST be a 400 (Bad Request) error.
2011-03-19 17:42:03 +01:00
Loïc Hoguin
408f167621 Move the reply function to cowboy_http_req. 2011-03-18 22:38:26 +01:00
Loïc Hoguin
c6ad0273a8 Introduce Handler:terminate to cleanup the handler's state. 2011-03-18 13:47:37 +01:00
Loïc Hoguin
5e80e4baac Handler:init/2 should also return the Request in case it changed. 2011-03-18 01:52:46 +01:00
Loïc Hoguin
f53235549d Introduce Handler:init/2 for initializing the handler state.
We need an init function in order to process upgrade instructions
for protocols like WebSockets, but also to request an active receive
mode for long-polling connections, both of which will be implemented
at a later time.
2011-03-18 00:15:46 +01:00
Loïc Hoguin
da72255940 Initial commit. 2011-03-17 00:29:35 +01:00