Commit graph

57 commits

Author SHA1 Message Date
Gered d0cd1d0bca doc-comments 2016-05-08 20:28:47 -04:00
Gered 3aed2c3b1b mark a bunch of internal functions/defs as private where appropriate
the real purpose of doing this is of course to make it more obvious
to anyone reading this code what is the actual intended public API
and what isn't
2016-05-08 19:30:36 -04:00
Gered 9d314c4d88 super nitpicky code formatting
i apologize to anyone looking at this commit and wondering why i would
do this, but all these little "off" formatting things have been bugging
me all day while looking at this code. i simply had to do something.
2016-05-08 19:20:28 -04:00
Gered 4e63631854 update disconnection reason strings to be a bit more descriptive 2016-05-08 19:03:31 -04:00
Gered 49409cac62 add server-side helper functions 2016-05-08 19:01:08 -04:00
Gered da2b5d94b2 update how browserchannel server-side application event handling works
up until now, a single event handler "on-session" could be provided to
wrap-browserchannel which would be invoked each time a new client
session was created. it was then the application's responsibility to
register listeners for close/receive events inside this on-session event
handler.

this was kind of clunky honestly. basically every application would want
to use all of these events, so why not reduce the boilerplate needed?

this change makes it so a map of event handlers (:on-open, :on-close and
:on-receive) can be passed under wrap-browserchannel's options map (in
the key :events). this makes it simpler for an application to set up
browserchannel event handlers, and it works in basically the exact same
way as the clientside event handler registration works right now
2016-05-08 18:44:54 -04:00
Gered ecb66421b0 rename clj-browserchannel-server as it now also includes cljs stuff 2016-05-08 18:00:42 -04:00