0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
RawSocketHandler.h
Go to the documentation of this file.
1 /* -*- c++ -*-
2  * Copyright (C) 2007-2015 Hypertable, Inc.
3  *
4  * This file is part of Hypertable.
5  *
6  * Hypertable is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 3
9  * of the License, or any later version.
10  *
11  * Hypertable is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19  * 02110-1301, USA.
20  */
21 
27 
28 #ifndef AsyncComm_RawSocketHandler_h
29 #define AsyncComm_RawSocketHandler_h
30 
31 #include <string>
32 
33 namespace Hypertable {
34 
37 
42  public:
43 
45  virtual ~RawSocketHandler() { return; }
46 
51  virtual bool handle(int sd, int events) = 0;
52 
57  virtual void deregister(int sd) = 0;
58 
68  virtual int poll_interest(int sd) = 0;
69 
70  };
71 
73 
74 } // namespace Hypertable
75 
76 #endif // AsyncComm_RawSocketHandler_h
virtual void deregister(int sd)=0
Deregister handler for a given socket.
Abstract base class for application raw socket handlers registered with AsyncComm.
virtual ~RawSocketHandler()
Destructor.
Hypertable definitions
virtual int poll_interest(int sd)=0
Returns desired polling interest for a socket.
virtual bool handle(int sd, int events)=0
Handle socket event.