#include <await_client_or_server.h>
 | 
| enum class   | AwaitResult { ClientReadable
, ServerReadable
 } | 
|   | 
| enum class   | Result {  
  Again
, RecvFromClient
, SendToClient
, RecvFromServer
,  
  RecvFromBoth
, SendToServer
, SendableToServer
, Suspend
,  
  Done
, Void
 
 } | 
|   | 
◆ AwaitResult
| Enumerator | 
|---|
| ClientReadable  |  | 
| ServerReadable  |  | 
 
 
◆ Stage
| Enumerator | 
|---|
| Init  |  | 
| WaitBoth  |  | 
| WaitClientCancelled  |  | 
| WaitServerCancelled  |  | 
| Done  |  | 
 
 
◆ AwaitClientOrServerProcessor()
◆ init()
◆ process()
◆ stage() [1/2]
  
  
      
        
          | Stage AwaitClientOrServerProcessor::stage  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inlineprivate   | 
  
 
 
◆ stage() [2/2]
  
  
      
        
          | void AwaitClientOrServerProcessor::stage  | 
          ( | 
          Stage  | 
          stage | ) | 
           | 
         
       
   | 
  
inlineprivate   | 
  
 
 
◆ wait_both()
wait for an read-event from client and server at the same time. 
two async-reads have been started, which both will call wait_both(). Only one of the two should continue.
To ensure that event handlers are properly synchronized:
- the first returning event, cancels the other waiter and leaves without "returning" (Void)
 
- the cancelled side, continues with executing. 
 
 
 
◆ wait_client_cancelled()
read-event from server while waiting for client command. 
- either a connection-close by the server or
 
- ERR packet before connection-close. 
 
 
 
◆ wait_server_cancelled()
◆ on_done_
◆ stage_
The documentation for this class was generated from the following files: