You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having trouble writing "elegant" code for an interactive client, i.e. imap client, IRC client
Specifically, I find it very hard to write in a way that makes sense which is the 1st step, which is 2nd etc due to the reactive/event driven nature, e.g.
Login
If login success, select a mailbox/join a channel
Then check how many messages there are/who is in the chat group
Most of the samples are a 1 transaction protocols like HTTP and I can't see any that applies the concepts of await etc
Possible to make a simple example, say POP3? Thank you!
The text was updated successfully, but these errors were encountered:
I don't know if I understand you correctly but if your looking for a interactive communication via CLI, you should take a look at clue/reactphp-stdio. @clue also has a project that sounds similar to yours: clue/reactphp-quassel.
Hope this will help you as a first step to move on. Let me know if you have any further questions!
Doesn't have to be interactive, it's more like how to make it not take the next steps until the earlier has succeeded, e.g. don't select a mailbox until login is complete. Sometimes multiple such sequential steps are needed and it makes my code quite unreadable, let alone testable.
Hi,
I'm having trouble writing "elegant" code for an interactive client, i.e. imap client, IRC client
Specifically, I find it very hard to write in a way that makes sense which is the 1st step, which is 2nd etc due to the reactive/event driven nature, e.g.
Most of the samples are a 1 transaction protocols like HTTP and I can't see any that applies the concepts of
await
etcPossible to make a simple example, say POP3? Thank you!
The text was updated successfully, but these errors were encountered: