Skip to content
This repository has been archived by the owner on Dec 28, 2018. It is now read-only.

WebSocket support #6

Open
2 of 4 tasks
FiniteReality opened this issue Dec 22, 2016 · 2 comments
Open
2 of 4 tasks

WebSocket support #6

FiniteReality opened this issue Dec 22, 2016 · 2 comments
Assignees
Milestone

Comments

@FiniteReality
Copy link
Owner

FiniteReality commented Dec 22, 2016

This issue will be used to track the status of the websocket client.

  • Connection logic
  • Heartbeat logic
  • Receive gateway events
  • IDENTIFY logic

Flowchart for reference: http://i.imgur.com/Wy5wbGq.png

@FiniteReality FiniteReality added this to the 0.1 milestone Dec 22, 2016
@FiniteReality FiniteReality self-assigned this Dec 22, 2016
FiniteReality added a commit that referenced this issue Feb 12, 2017
Semaphores aren't based on the CoreCLR anymore; that was left over
from when I was screwing about trying to get things to work.

Now we can decode JSON using the static methods of entity<T> classes,
and in the future typechecking will be put in to ensure valid json is
passed to these types (right now it will throw a json exception, we
should add custom exception types to make errors easier to debug.

TODO from this point onwards:
- Implement REST API methods in api_client.cpp (see #5)
- Remove `disccord_` prefix from client types
- Add entity types for all discord entities
- Implement websocket API (see #6)
- Implement entity cache
- Clean up includes
- Include a test script (?)
- Expand test range (see #2)
- Write documentation (see #7 for more info)
@abuneri
Copy link
Contributor

abuneri commented Feb 28, 2017

Right now it looks like we are just using going to use the regular web::websockets::client::websocket_client, however; I highly recommend that we use web::websockets::client::websocket_callback_client since it is specifically made for applications that want to maintain a connection host for a long time. If we just use websocket_client, then we will have to make our own event loop for the receive method, which is tricky as well because we may miss messages that way. But instead of receive, websocket_callback_client has a method set_message_handler which does all that work for us, and receives every incoming message, its quite nice.

@FiniteReality
Copy link
Owner Author

FiniteReality commented Mar 1, 2017 via email

@FiniteReality FiniteReality modified the milestones: 0.1, 0.2 Mar 11, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants