Changeset 21:eb59943050c9 in xplcommon for src/xplcommon/LocalAcceptor.h
- Timestamp:
- 12/31/12 14:17:32 (11 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/xplcommon/LocalAcceptor.h
r17 r21 32 32 //------------------------------------------------------------------------------ 33 33 34 #include " Acceptor.h"34 #include "Failable.h" 35 35 36 36 //------------------------------------------------------------------------------ … … 48 48 * connection. 49 49 */ 50 class LocalAcceptor : public Acceptor50 class LocalAcceptor : public FailableReference<LocalAcceptor> 51 51 { 52 52 public: 53 54 /** 55 * Start accepting a connection. 56 * 57 * If a connection is already accepted, but not retrieved yet, it 58 * returns true. 59 * 60 * If a new socket becomes immediately available, it returns true. 61 * 62 * If some error occurs, the acceptor is marked as failed. 63 */ 64 bool accept(); 65 53 66 /** 54 67 * Get the local socket accepted last. If no socket was accepted, 55 * return 0. The local socket's waiter will be the given one 56 * (which can be 0). 68 * return 0. The local socket's waiter will be the given one. If 69 * the server socket has no waiter, this one should be 0. If the 70 * server socket has a waiter, this one should not be 0. In other 71 * words, if the server socket is non-blocking, the accepted one 72 * should also be non-blocking, if the server socket is blocking, 73 * the accepted one should also be blocking. 57 74 */ 58 75 LocalSocket* getSocket(Waiter* waiter,
Note:
See TracChangeset
for help on using the changeset viewer.