]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - src/socketengine.cpp
668335e6b17c0abcee8ed42a92415c7e23ab9efb
[user/henk/code/inspircd.git] / src / socketengine.cpp
1 /*       +------------------------------------+
2  *       | Inspire Internet Relay Chat Daemon |
3  *       +------------------------------------+
4  *
5  *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
6  * See: http://www.inspircd.org/wiki/index.php/Credits
7  *
8  * This program is free but copyrighted software; see
9  *            the file COPYING for details.
10  *
11  * ---------------------------------------------------
12  */
13
14 #include "inspircd.h"
15 #include "socketengine.h"
16
17 int EventHandler::GetFd()
18 {
19         return this->fd;
20 }
21
22 void EventHandler::SetFd(int FD)
23 {
24         this->fd = FD;
25 }
26
27 bool EventHandler::Readable()
28 {
29         return true;
30 }
31
32 bool EventHandler::Writeable()
33 {
34         return false;
35 }
36
37 void SocketEngine::WantWrite(EventHandler* eh)
38 {
39 }
40
41 SocketEngine::SocketEngine(InspIRCd* Instance) : ServerInstance(Instance)
42 {
43         memset(ref, 0, sizeof(ref));
44 }
45
46 SocketEngine::~SocketEngine()
47 {
48 }
49
50 bool SocketEngine::AddFd(EventHandler* eh)
51 {
52         return true;
53 }
54
55 bool SocketEngine::HasFd(int fd)
56 {
57         if ((fd < 0) || (fd > MAX_DESCRIPTORS))
58                 return false;
59         return ref[fd];
60 }
61
62 EventHandler* SocketEngine::GetRef(int fd)
63 {
64         if ((fd < 0) || (fd > MAX_DESCRIPTORS))
65                 return false;
66         return ref[fd];
67 }
68
69 bool SocketEngine::DelFd(EventHandler* eh, bool force)
70 {
71         return true;
72 }
73
74 int SocketEngine::GetMaxFds()
75 {
76         return 0;
77 }
78
79 int SocketEngine::GetRemainingFds()
80 {
81         return 0;
82 }
83
84 int SocketEngine::DispatchEvents()
85 {
86         return 0;
87 }
88
89 std::string SocketEngine::GetName()
90 {
91         return "misconfigured";
92 }
93