Commit Graph

34 Commits

Author SHA1 Message Date
R Tyler Croy 87cfb1d3da
Merge pull request #3 from rtyler/default-for-typed-messages
Invoke the default handler when an unknown message type is sent
2020-07-05 20:14:40 -07:00
R Tyler Croy 12b4948355 Invoke the default handler when an unknown message type is sent
For well formed messages which do _not_ have a known message type, the previous
behavior was to simply drop the message. This change ensures that the default
handler has a chance to execute even on well formed messages
2020-07-05 15:02:16 -07:00
R Tyler Croy 0f28c3e472
Merge pull request #2 from rtyler/terminator
Add support for sending a termination signal to the server loop
2020-07-05 08:09:54 -07:00
R Tyler Croy c49b9a09d7 Add support for sending a termination signal to the server loop
See examples/terminate.rs, but this basically allows for using Meows easily
inside of a test infrastructure.
2020-07-05 07:58:05 -07:00
R Tyler Croy 71e48ad9e9
Merge pull request #1 from rtyler/multisend
Allow handlers to send multiple messages to the client in a handler
2020-07-04 14:59:37 -07:00
R Tyler Croy b41d77af70 Add the multisend example to demonstrate sending multiple responses on a message 2020-07-04 14:47:40 -07:00
R Tyler Croy 9c45b28157 Properly handle close messages from the client and cleanly exit the runloop 2020-07-04 14:44:47 -07:00
R Tyler Croy d407304e80 Add the `sink` member to Request, which allows multiple messages to be send by a handler
This still requires more testing, but in theory it should allow handlers to
clone the `sink` and do _other_ asynchronous outbound writes to the websocket.
In essence, a handler could send dozens of messages out to the websocket when
handling the inbound message, rather than just a single message.

This still limits reads to the "normal" control flow in Meows
2020-07-04 14:36:37 -07:00
R Tyler Croy c40a9dc65f
Fix asciidoc'd links 2020-06-24 11:25:09 -07:00
R Tyler Croy 41747cf48d Merge remote-tracking branch 'github/master' 2020-06-14 10:03:01 -07:00
R Tyler Croy 4841821cbd Add support for a second generic parameter for client state
Client state will be instantiated for every new client and gives the meows user
the opportunity to maintain state for the client across message handlers
2020-06-14 10:02:03 -07:00
R Tyler Croy 392ceb11ab
Add a simple github action for testing 2020-06-14 09:25:46 -07:00
R Tyler Croy 9b190e22df Include the readme in crates.io 2020-06-14 09:15:28 -07:00
R Tyler Croy ec591e5038 Remove unused crates from the dependencies 2020-06-14 09:09:18 -07:00
R Tyler Croy 423c80c0a1 Missed a description field 2020-06-14 09:06:54 -07:00
R Tyler Croy 6a6b56925f Switch the readme to markdown to make sure it's nice on crates.io 2020-06-14 09:01:28 -07:00
R Tyler Croy 51cf45a61a Add some metadata to the Cargo.toml for publishing on crates.io 2020-06-14 08:56:10 -07:00
R Tyler Croy b9c595c536 Add an example that defines its own server state 2020-06-13 23:33:54 -07:00
R Tyler Croy 8d682b474b cargo fmt 2020-06-13 23:16:40 -07:00
R Tyler Croy 51bca75ca7 Rename to ServerState to make way for ConnectionState too
That refactoring will have to wait for tomorrow
2020-06-13 23:16:09 -07:00
R Tyler Croy 842ea3ffb0 Make it more obvious the example is using a deserialized struct 2020-06-13 23:09:15 -07:00
R Tyler Croy 3a34a03c88 Remove unnecessary/old macro from readme 2020-06-13 23:05:27 -07:00
R Tyler Croy e63c2974b8 cargo fmt 2020-06-13 23:02:42 -07:00
R Tyler Croy 1edfde4efd Add some more rustdocs 2020-06-13 23:02:33 -07:00
R Tyler Croy af3717a279 Refacor the handlers to mimic tide more closely
This is still a work in progress but I'm pleased with how it's turning out. The
work that is still to be done is handling custom Server state and custom
Connection-specific state.
2020-06-13 22:19:05 -07:00
R Tyler Croy 3af296a7cc Work in progress, refactoring this a lot more; inspired by tide 2020-06-13 15:16:13 -07:00
R Tyler Croy ffc2b5b126 Add the GPL v3 license 2020-06-13 11:50:49 -07:00
R Tyler Croy 116e57cf33 Add a little bit more detail to the README 2020-06-13 11:39:17 -07:00
R Tyler Croy 48c1630100 Convert the message handlers to be async by default
This is important for a lot of use-cases where we need to fetch data from
somewhere else in the program before returning a message response
2020-06-13 11:16:59 -07:00
R Tyler Croy 6251921fd8 Refactor the unnnecessary trait away 2020-06-13 10:30:32 -07:00
R Tyler Croy 94b29c0292 Add a little more readme details now that the example is working 2020-06-07 16:00:51 -07:00
R Tyler Croy 932ddb085e Handle the invocation to typed parameters using the existing Dispatch work
This doesn't support async functions, which are going to be coming shortly
2020-06-07 15:56:20 -07:00
R Tyler Croy 22af762bbb IT'S ALIVE!!!!!!!!!!!!!!!!!!!!!!!!1:w 2020-06-07 15:37:16 -07:00
R Tyler Croy 1e42eb0640 Initial commit
Still working
2020-06-07 15:17:25 -07:00