1 //
2 // Copyright (c) ZeroC, Inc. All rights reserved.
3 //
4 
5 namespace IceInternal
6 {
7 
8 public abstract class EventHandler
9 {
10     //
11     // Called to start a new asynchronous read or write operation.
12     //
startAsync(int op, AsyncCallback cb, ref bool completedSynchronously)13     abstract public bool startAsync(int op, AsyncCallback cb, ref bool completedSynchronously);
14 
finishAsync(int op)15     abstract public bool finishAsync(int op);
16 
17     //
18     // Called when there's a message ready to be processed.
19     //
message(ref ThreadPoolCurrent op)20     abstract public void message(ref ThreadPoolCurrent op);
21 
22     //
23     // Called when the event handler is unregistered.
24     //
finished(ref ThreadPoolCurrent op)25     abstract public void finished(ref ThreadPoolCurrent op);
26 
27     internal int _ready = 0;
28     internal int _pending = 0;
29     internal int _started = 0;
30     internal bool _finish = false;
31 
32     internal bool _hasMoreData = false;
33     internal int _registered = 0;
34 }
35 
36 }
37