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