1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd: (C) 2002-2008 InspIRCd Development Team
6 * See: http://www.inspircd.org/wiki/index.php/Credits
8 * This program is free but copyrighted software; see
9 * the file COPYING for details.
11 * ---------------------------------------------------
14 #ifndef __INSPIRCD_H__
15 #define __INSPIRCD_H__
20 #define printf_c printf
22 #include "inspircd_win32wrapper.h"
23 /** Windows defines these already */
32 #include "inspircd_config.h"
35 #include "usermanager.h"
39 #include "socketengine.h"
40 #include "command_parse.h"
42 #include "cull_list.h"
43 #include "filelogger.h"
47 * Used to define the maximum number of parameters a command may have.
49 #define MAXPARAMETERS 127
51 /** Returned by some functions to indicate failure.
55 /** Support for librodent -
56 * see http://www.chatspike.net/index.php?z=64
58 #define ETIREDHAMSTERS EAGAIN
60 /** Template function to convert any input type to std::string
62 template<typename T> inline std::string ConvNumeric(const T &in)
64 if (in == 0) return "0";
69 *out = "0123456789"[ std::abs( (long)quotient % 10 ) ];
76 std::reverse(res,out);
80 /** Template function to convert any input type to std::string
82 inline std::string ConvToStr(const int in)
84 return ConvNumeric(in);
87 /** Template function to convert any input type to std::string
89 inline std::string ConvToStr(const long in)
91 return ConvNumeric(in);
94 /** Template function to convert any input type to std::string
96 inline std::string ConvToStr(const char* in)
101 /** Template function to convert any input type to std::string
103 inline std::string ConvToStr(const bool in)
105 return (in ? "1" : "0");
108 /** Template function to convert any input type to std::string
110 inline std::string ConvToStr(char in)
112 return std::string(in,1);
115 /** Template function to convert any input type to std::string
117 template <class T> inline std::string ConvToStr(const T &in)
119 std::stringstream tmp;
120 if (!(tmp << in)) return std::string();
124 /** Template function to convert any input type to any other type
125 * (usually an integer or numeric type)
127 template<typename T> inline long ConvToInt(const T &in)
129 std::stringstream tmp;
130 if (!(tmp << in)) return 0;
131 return atoi(tmp.str().c_str());
134 /** Template function to convert integer to char, storing result in *res and
135 * also returning the pointer to res. Based on Stuart Lowe's C/C++ Pages.
136 * @param T input value
137 * @param V result value
138 * @param R base to convert to
140 template<typename T, typename V, typename R> inline char* itoa(const T &in, V *res, R base)
142 if (base < 2 || base > 16) { *res = 0; return res; }
146 *out = "0123456789abcdef"[ std::abs( quotient % base ) ];
150 if ( in < 0 && base == 10) *out++ = '-';
151 std::reverse( res, out );
156 /** This class contains various STATS counters
157 * It is used by the InspIRCd class, which internally
158 * has an instance of it.
160 class serverstats : public classbase
163 /** Number of accepted connections
165 unsigned long statsAccept;
166 /** Number of failed accepts
168 unsigned long statsRefused;
169 /** Number of unknown commands seen
171 unsigned long statsUnknown;
172 /** Number of nickname collisions handled
174 unsigned long statsCollisions;
175 /** Number of DNS queries sent out
177 unsigned long statsDns;
178 /** Number of good DNS replies received
179 * NOTE: This may not tally to the number sent out,
180 * due to timeouts and other latency issues.
182 unsigned long statsDnsGood;
183 /** Number of bad (negative) DNS replies received
184 * NOTE: This may not tally to the number sent out,
185 * due to timeouts and other latency issues.
187 unsigned long statsDnsBad;
188 /** Number of inbound connections seen
190 unsigned long statsConnects;
191 /** Total bytes of data transmitted
194 /** Total bytes of data received
197 /** Cpu usage at last sample
200 /** Time last sample was read
203 /** The constructor initializes all the counts to zero
206 : statsAccept(0), statsRefused(0), statsUnknown(0), statsCollisions(0), statsDns(0),
207 statsDnsGood(0), statsDnsBad(0), statsConnects(0), statsSent(0.0), statsRecv(0.0)
212 /** A list of failed port bindings, used for informational purposes on startup */
213 typedef std::vector<std::pair<std::string, long> > FailedPortList;
217 DEFINE_HANDLER1(ProcessUserHandler, void, User*);
218 DEFINE_HANDLER1(IsNickHandler, bool, const char*);
219 DEFINE_HANDLER1(IsIdentHandler, bool, const char*);
220 DEFINE_HANDLER1(FindDescriptorHandler, User*, int);
221 DEFINE_HANDLER1(FloodQuitUserHandler, void, User*);
223 /* Forward declaration - required */
225 class BanCacheManager;
227 /** The main class of the irc server.
228 * This class contains instances of all the other classes
229 * in this software, with the exception of the base class,
230 * classbase. Amongst other things, it contains a ModeParser,
231 * a DNS object, a CommandParser object, and a list of active
232 * Module objects, and facilities for Module objects to
233 * interact with the core system it implements. You should
234 * NEVER attempt to instantiate a class of type InspIRCd
235 * yourself. If you do, this is equivalent to spawning a second
236 * IRC server, and could have catastrophic consequences for the
237 * program in terms of ram usage (basically, you could create
238 * an obese forkbomb built from recursively spawning irc servers!)
240 class CoreExport InspIRCd : public classbase
243 /** Holds the current UID. Used to generate the next one.
245 char current_uid[UUID_LENGTH];
247 /** Set up the signal handlers
251 /** Daemonize the ircd and close standard input/output streams
252 * @return True if the program daemonized succesfully
256 /** Iterate the list of BufferedSocket objects, removing ones which have timed out
257 * @param TIME the current time
259 void DoSocketTimeouts(time_t TIME);
261 /** Sets up UID subsystem
263 void InitialiseUID();
265 /** Perform background user events such as PING checks
267 void DoBackgroundUserStuff();
269 /** Returns true when all modules have done pre-registration checks on a user
270 * @param user The user to verify
271 * @return True if all modules have finished checking this user
273 bool AllModulesReportReady(User* user);
275 /** Logfile pathname specified on the commandline, or empty string
277 char LogFileName[MAXBUF];
279 /** The current time, updated in the mainloop
283 /** The time that was recorded last time around the mainloop
287 /** A 64k buffer used to read client lines into
289 char ReadBuffer[65535];
291 /** Used when connecting clients
293 insp_sockaddr client, server;
295 /** Used when connecting clients
299 /** Nonblocking file writer
303 /** Time offset in seconds
304 * This offset is added to all calls to Time(). Use SetTimeDelta() to update
314 /** Global cull list, will be processed on next iteration
316 CullList GlobalCulls;
320 ProcessUserHandler HandleProcessUser;
321 IsNickHandler HandleIsNick;
322 IsIdentHandler HandleIsIdent;
323 FindDescriptorHandler HandleFindDescriptor;
324 FloodQuitUserHandler HandleFloodQuitUser;
326 /** BufferedSocket classes pending deletion after being closed.
327 * We don't delete these immediately as this may cause a segmentation fault.
329 std::map<BufferedSocket*,BufferedSocket*> SocketCull;
331 /** Globally accessible fake user record. This is used to force mode changes etc across s2s, etc.. bit ugly, but.. better than how this was done in 1.1
334 * SendMode expects a User* to send the numeric replies
335 * back to, so we create it a fake user that isnt in the user
336 * hash and set its descriptor to FD_MAGIC_NUMBER so the data
337 * falls into the abyss :p
341 /** Returns the next available UID for this server.
343 std::string GetUID();
345 /** Find a user in the UUID hash
346 * @param nick The nickname to find
347 * @return A pointer to the user, or NULL if the user does not exist
349 User *FindUUID(const std::string &);
351 /** Find a user in the UUID hash
352 * @param nick The nickname to find
353 * @return A pointer to the user, or NULL if the user does not exist
355 User *FindUUID(const char *);
357 /** Build the ISUPPORT string by triggering all modules On005Numeric events
359 void BuildISupport();
361 /** Number of unregistered users online right now.
362 * (Unregistered means before USER/NICK/dns)
364 int unregistered_count;
366 /** List of server names we've seen.
368 servernamelist servernames;
370 /** Time this ircd was booted
374 /** Config file pathname specified on the commandline or via ./configure
376 char ConfigFileName[MAXBUF];
378 /** Mode handler, handles mode setting and removal
382 /** Command parser, handles client to server commands
384 CommandParser* Parser;
386 /** Socket engine, handles socket activity events
390 /** ModuleManager contains everything related to loading/unloading
393 ModuleManager* Modules;
395 /** BanCacheManager is used to speed up checking of restrictions on connection
398 BanCacheManager *BanCache;
400 /** Stats class, holds miscellaneous stats counters
404 /** Server Config class, holds configuration file data
406 ServerConfig* Config;
408 /** Snomask manager - handles routing of snomask messages
413 /** Client list, a hash_map containing all clients, local and remote
415 user_hash* clientlist;
417 /** Client list stored by UUID. Contains all clients, and is updated
418 * automatically by the constructor and destructor of User.
422 /** Channel list, a hash_map containing all channels
426 /** Local client list, a vector containing only local clients
428 std::vector<User*> local_users;
430 /** Oper list, a vector containing all local and remote opered users
432 std::list<User*> all_opers;
434 /** DNS class, provides resolver facilities to the core and modules
438 /** Timer manager class, triggers Timer timer events
440 TimerManager* Timers;
442 /** X-Line manager. Handles G/K/Q/E line setting, removal and matching
444 XLineManager* XLines;
446 /** User manager. Various methods and data associated with users.
450 /** Set to the current signal recieved
454 /** Get the current time
455 * Because this only calls time() once every time around the mainloop,
456 * it is much faster than calling time() directly.
457 * @param delta True to use the delta as an offset, false otherwise
458 * @return The current time as an epoch value (time_t)
460 time_t Time(bool delta = false);
462 /** Set the time offset in seconds
463 * This offset is added to Time() to offset the system time by the specified
465 * @param delta The number of seconds to offset
466 * @return The old time delta
468 int SetTimeDelta(int delta);
470 /** Number of users with a certain mode set on them
472 int ModeCount(const char mode);
474 /** Get the time offset in seconds
475 * @return The current time delta (in seconds)
479 /** Process a user whos socket has been flagged as active
480 * @param cu The user to process
481 * @return There is no actual return value, however upon exit, the user 'cu' may have been
482 * marked for deletion in the global CullList.
484 caller1<void, User*> ProcessUser;
486 /** Bind all ports specified in the configuration file.
487 * @param bail True if the function should bail back to the shell on failure
488 * @param found_ports The actual number of ports found in the config, as opposed to the number actually bound
489 * @return The number of ports actually bound without error
491 int BindPorts(bool bail, int &found_ports, FailedPortList &failed_ports);
493 /** Binds a socket on an already open file descriptor
494 * @param sockfd A valid file descriptor of an open socket
495 * @param port The port number to bind to
496 * @param addr The address to bind to (IP only)
497 * @return True if the port was bound successfully
499 bool BindSocket(int sockfd, int port, char* addr, bool dolisten = true);
501 /** Adds a server name to the list of servers we've seen
502 * @param The servername to add
504 void AddServerName(const std::string &servername);
506 /** Finds a cached char* pointer of a server name,
507 * This is used to optimize User by storing only the pointer to the name
508 * @param The servername to find
509 * @return A pointer to this name, gauranteed to never become invalid
511 const char* FindServerNamePtr(const std::string &servername);
513 /** Returns true if we've seen the given server name before
514 * @param The servername to find
515 * @return True if we've seen this server name before
517 bool FindServerName(const std::string &servername);
519 /** Gets the GECOS (description) field of the given server.
520 * If the servername is not that of the local server, the name
521 * is passed to handling modules which will attempt to determine
522 * the GECOS that bleongs to the given servername.
523 * @param servername The servername to find the description of
524 * @return The description of this server, or of the local server
526 std::string GetServerDescription(const char* servername);
528 /** Write text to all opers connected to this server
529 * @param text The text format string
530 * @param ... Format args
532 void WriteOpers(const char* text, ...);
534 /** Write text to all opers connected to this server
535 * @param text The text to send
537 void WriteOpers(const std::string &text);
539 /** Find a user in the nick hash.
540 * If the user cant be found in the nick hash check the uuid hash
541 * @param nick The nickname to find
542 * @return A pointer to the user, or NULL if the user does not exist
544 User* FindNick(const std::string &nick);
546 /** Find a user in the nick hash.
547 * If the user cant be found in the nick hash check the uuid hash
548 * @param nick The nickname to find
549 * @return A pointer to the user, or NULL if the user does not exist
551 User* FindNick(const char* nick);
553 /** Find a user in the nick hash ONLY
555 User* FindNickOnly(const char* nick);
557 /** Find a user in the nick hash ONLY
559 User* FindNickOnly(const std::string &nick);
561 /** Find a channel in the channels hash
562 * @param chan The channel to find
563 * @return A pointer to the channel, or NULL if the channel does not exist
565 Channel* FindChan(const std::string &chan);
567 /** Find a channel in the channels hash
568 * @param chan The channel to find
569 * @return A pointer to the channel, or NULL if the channel does not exist
571 Channel* FindChan(const char* chan);
573 /** Check for a 'die' tag in the config file, and abort if found
574 * @return Depending on the configuration, this function may never return
578 /** Check we aren't running as root, and exit if we are
579 * @return Depending on the configuration, this function may never return
583 /** Determine the right path for, and open, the logfile
584 * @param argv The argv passed to main() initially, used to calculate program path
585 * @param argc The argc passed to main() initially, used to calculate program path
586 * @return True if the log could be opened, false if otherwise
588 bool OpenLog(char** argv, int argc);
590 /** Close the currently open log file
594 /** Send a server notice to all local users
595 * @param text The text format string to send
596 * @param ... The format arguments
598 void ServerNoticeAll(char* text, ...);
600 /** Send a server message (PRIVMSG) to all local users
601 * @param text The text format string to send
602 * @param ... The format arguments
604 void ServerPrivmsgAll(char* text, ...);
606 /** Send text to all users with a specific set of modes
607 * @param modes The modes to check against, without a +, e.g. 'og'
608 * @param flags one of WM_OR or WM_AND. If you specify WM_OR, any one of the
609 * mode characters in the first parameter causes receipt of the message, and
610 * if you specify WM_OR, all the modes must be present.
611 * @param text The text format string to send
612 * @param ... The format arguments
614 void WriteMode(const char* modes, int flags, const char* text, ...);
616 /** Return true if a channel name is valid
617 * @param chname A channel name to verify
618 * @return True if the name is valid
620 bool IsChannel(const char *chname);
622 /** Return true if str looks like a server ID
623 * @param string to check against
625 bool IsSID(const std::string &str);
627 /** Rehash the local server
631 /** Handles incoming signals after being set
632 * @param signal the signal recieved
634 void SignalHandler(int signal);
636 /** Sets the signal recieved
637 * @param signal the signal recieved
639 static void SetSignal(int signal);
641 /** Causes the server to exit after unloading modules and
642 * closing all open file descriptors.
644 * @param The exit code to give to the operating system
645 * (See the ExitStatus enum for valid values)
647 void Exit(int status);
649 /** Causes the server to exit immediately with exit code 0.
650 * The status code is required for signal handlers, and ignored.
652 static void QuickExit(int status);
654 /** Return a count of users, unknown and known connections
655 * @return The number of users
659 /** Return a count of fully registered connections only
660 * @return The number of registered users
662 int RegisteredUserCount();
664 /** Return a count of opered (umode +o) users only
665 * @return The number of opers
669 /** Return a count of unregistered (before NICK/USER) users only
670 * @return The number of unregistered (unknown) connections
672 int UnregisteredUserCount();
674 /** Return a count of channels on the network
675 * @return The number of channels
679 /** Return a count of local users on this server only
680 * @return The number of local users
682 long LocalUserCount();
684 /** Send an error notice to all local users, opered and unopered
685 * @param s The error string to send
687 void SendError(const std::string &s);
689 /** Return true if a nickname is valid
690 * @param n A nickname to verify
691 * @return True if the nick is valid
693 caller1<bool, const char*> IsNick;
695 /** Return true if an ident is valid
696 * @param An ident to verify
697 * @return True if the ident is valid
699 caller1<bool, const char*> IsIdent;
701 /** Find a username by their file descriptor.
702 * It is preferred to use this over directly accessing the fd_ref_table array.
703 * @param socket The file descriptor of a user
704 * @return A pointer to the user if the user exists locally on this descriptor
706 caller1<User*, int> FindDescriptor;
708 /** Add a new mode to this server's mode parser
709 * @param mh The modehandler to add
710 * @return True if the mode handler was added
712 bool AddMode(ModeHandler* mh);
714 /** Add a new mode watcher to this server's mode parser
715 * @param mw The modewatcher to add
716 * @return True if the modewatcher was added
718 bool AddModeWatcher(ModeWatcher* mw);
720 /** Delete a mode watcher from this server's mode parser
721 * @param mw The modewatcher to delete
722 * @return True if the modewatcher was deleted
724 bool DelModeWatcher(ModeWatcher* mw);
726 /** Add a dns Resolver class to this server's active set
727 * @param r The resolver to add
728 * @param cached If this value is true, then the cache will
729 * be searched for the DNS result, immediately. If the value is
730 * false, then a request will be sent to the nameserver, and the
731 * result will not be immediately available. You should usually
732 * use the boolean value which you passed to the Resolver
733 * constructor, which Resolver will set appropriately depending
734 * on if cached results are available and haven't expired. It is
735 * however safe to force this value to false, forcing a remote DNS
736 * lookup, but not an update of the cache.
737 * @return True if the operation completed successfully. Note that
738 * if this method returns true, you should not attempt to access
739 * the resolver class you pass it after this call, as depending upon
740 * the request given, the object may be deleted!
742 bool AddResolver(Resolver* r, bool cached);
744 /** Add a command to this server's command parser
745 * @param f A Command command handler object to add
746 * @throw ModuleException Will throw ModuleExcption if the command already exists
748 void AddCommand(Command *f);
750 /** Send a modechange.
751 * The parameters provided are identical to that sent to the
752 * handler for class cmd_mode.
753 * @param parameters The mode parameters
754 * @param pcnt The number of items you have given in the first parameter
755 * @param user The user to send error messages to
757 void SendMode(const char **parameters, int pcnt, User *user);
759 /** Match two strings using pattern matching.
760 * This operates identically to the global function match(),
761 * except for that it takes std::string arguments rather than
763 * @param sliteral The literal string to match against
764 * @param spattern The pattern to match against. CIDR and globs are supported.
766 bool MatchText(const std::string &sliteral, const std::string &spattern);
768 /** Call the handler for a given command.
769 * @param commandname The command whos handler you wish to call
770 * @param parameters The mode parameters
771 * @param pcnt The number of items you have given in the first parameter
772 * @param user The user to execute the command as
773 * @return True if the command handler was called successfully
775 CmdResult CallCommandHandler(const std::string &commandname, const char** parameters, int pcnt, User* user);
777 /** Return true if the command is a module-implemented command and the given parameters are valid for it
778 * @param parameters The mode parameters
779 * @param pcnt The number of items you have given in the first parameter
780 * @param user The user to test-execute the command as
781 * @return True if the command handler is a module command, and there are enough parameters and the user has permission to the command
783 bool IsValidModuleCommand(const std::string &commandname, int pcnt, User* user);
785 /** Return true if the given parameter is a valid nick!user\@host mask
786 * @param mask A nick!user\@host masak to match against
787 * @return True i the mask is valid
789 bool IsValidMask(const std::string &mask);
791 /** Rehash the local server
795 /** Return the channel whos index number matches that provided
796 * @param The index number of the channel to fetch
797 * @return A channel record, or NUll if index < 0 or index >= InspIRCd::ChannelCount()
799 Channel* GetChannelIndex(long index);
801 /** Dump text to a user target, splitting it appropriately to fit
802 * @param User the user to dump the text to
803 * @param LinePrefix text to prefix each complete line with
804 * @param TextStream the text to send to the user
806 void DumpText(User* User, const std::string &LinePrefix, stringstream &TextStream);
808 /** Check if the given nickmask matches too many users, send errors to the given user
809 * @param nick A nickmask to match against
810 * @param user A user to send error text to
811 * @return True if the nick matches too many users
813 bool NickMatchesEveryone(const std::string &nick, User* user);
815 /** Check if the given IP mask matches too many users, send errors to the given user
816 * @param ip An ipmask to match against
817 * @param user A user to send error text to
818 * @return True if the ip matches too many users
820 bool IPMatchesEveryone(const std::string &ip, User* user);
822 /** Check if the given hostmask matches too many users, send errors to the given user
823 * @param mask A hostmask to match against
824 * @param user A user to send error text to
825 * @return True if the host matches too many users
827 bool HostMatchesEveryone(const std::string &mask, User* user);
829 /** Calculate a duration in seconds from a string in the form 1y2w3d4h6m5s
830 * @param str A string containing a time in the form 1y2w3d4h6m5s
831 * (one year, two weeks, three days, four hours, six minutes and five seconds)
832 * @return The total number of seconds
834 long Duration(const std::string &str);
836 /** Attempt to compare an oper password to a string from the config file.
837 * This will be passed to handling modules which will compare the data
838 * against possible hashed equivalents in the input string.
839 * @param data The data from the config file
840 * @param input The data input by the oper
841 * @param tagnum the tag number of the oper's tag in the config file
842 * @return 0 if the strings match, 1 or -1 if they do not
844 int OperPassCompare(const char* data,const char* input, int tagnum);
846 /** Check if a given server is a uline.
847 * An empty string returns true, this is by design.
848 * @param server The server to check for uline status
849 * @return True if the server is a uline OR the string is empty
851 bool ULine(const char* server);
853 /** Returns true if the uline is 'silent' (doesnt generate
854 * remote connect notices etc).
856 bool SilentULine(const char* server);
858 /** Returns the subversion revision ID of this ircd
859 * @return The revision ID or an empty string
861 std::string GetRevision();
863 /** Returns the full version string of this ircd
864 * @return The version string
866 std::string GetVersionString();
868 /** Attempt to write the process id to a given file
869 * @param filename The PID file to attempt to write to
870 * @return This function may bail if the file cannot be written
872 void WritePID(const std::string &filename);
874 /** This constructor initialises all the subsystems and reads the config file.
875 * @param argc The argument count passed to main()
876 * @param argv The argument list passed to main()
877 * @throw <anything> If anything is thrown from here and makes it to
878 * you, you should probably just give up and go home. Yes, really.
879 * It's that bad. Higher level classes should catch any non-fatal exceptions.
881 InspIRCd(int argc, char** argv);
883 /** Output a log message to the ircd.log file
884 * The text will only be output if the current loglevel
885 * is less than or equal to the level you provide
886 * @param level A log level from the DebugLevel enum
887 * @param text Format string of to write to the log
888 * @param ... Format arguments of text to write to the log
890 void Log(int level, const char* text, ...);
892 /** Output a log message to the ircd.log file
893 * The text will only be output if the current loglevel
894 * is less than or equal to the level you provide
895 * @param level A log level from the DebugLevel enum
896 * @param text Text to write to the log
898 void Log(int level, const std::string &text);
900 /** Send a line of WHOIS data to a user.
901 * @param user user to send the line to
902 * @param dest user being WHOISed
903 * @param numeric Numeric to send
904 * @param text Text of the numeric
906 void SendWhoisLine(User* user, User* dest, int numeric, const std::string &text);
908 /** Send a line of WHOIS data to a user.
909 * @param user user to send the line to
910 * @param dest user being WHOISed
911 * @param numeric Numeric to send
912 * @param format Format string for the numeric
913 * @param ... Parameters for the format string
915 void SendWhoisLine(User* user, User* dest, int numeric, const char* format, ...);
917 /** Quit a user for excess flood, and if they are not
918 * fully registered yet, temporarily zline their IP.
919 * @param current user to quit
921 caller1<void, User*> FloodQuitUser;
923 /** Restart the server.
924 * This function will not return. If an error occurs,
925 * it will throw an instance of CoreException.
926 * @param reason The restart reason to show to all clients
927 * @throw CoreException An instance of CoreException indicating the error from execv().
929 void Restart(const std::string &reason);
931 /** Prepare the ircd for restart or shutdown.
932 * This function unloads all modules which can be unloaded,
933 * closes all open sockets, and closes the logfile.
937 /** This copies the user and channel hash_maps into new hash maps.
938 * This frees memory used by the hash_map allocator (which it neglects
939 * to free, most of the time, using tons of ram)
941 void RehashUsersAndChans();
943 /** Resets the cached max bans value on all channels.
948 /** Return a time_t as a human-readable string.
950 std::string TimeString(time_t curtime);
952 /** Begin execution of the server.
953 * NOTE: this function NEVER returns. Internally,
954 * it will repeatedly loop.
955 * @return The return value for this function is undefined.
959 /** Force all BufferedSockets to be removed which are due to
962 void BufferedSocketCull();
964 char* GetReadBuffer()
966 return this->ReadBuffer;