|
|||
|
|||
|


Public Member Functions | |
| ModuleZLib (InspIRCd *Me) | |
| virtual | ~ModuleZLib () |
| virtual Version | GetVersion () |
| Returns the version number of a Module. | |
| virtual const char * | OnRequest (Request *request) |
| Called whenever a Request class is sent to your module by another module. | |
| virtual int | OnStats (char symbol, User *user, string_list &results) |
| Called on all /STATS commands This method is triggered for all /STATS use, including stats symbols handled by the core. | |
| virtual void | OnRawSocketConnect (int fd) |
| Called immediately upon connection of an outbound BufferedSocket which has been hooked by a module. | |
| virtual void | OnRawSocketAccept (int fd, const std::string &ip, int localport) |
| Called immediately after any connection is accepted. | |
| virtual void | OnRawSocketClose (int fd) |
| Called immediately before any socket is closed. | |
| virtual int | OnRawSocketRead (int fd, char *buffer, unsigned int count, int &readresult) |
| Called immediately before any read() operation on a client socket in the core. | |
| virtual int | OnRawSocketWrite (int fd, const char *buffer, int count) |
| Called immediately before any write() operation on a user's socket in the core. | |
| void | Error (izip_session *session, const std::string &text) |
| void | CloseSession (izip_session *session) |
Private Attributes | |
| izip_session * | sessions |
| float | total_out_compressed |
| float | total_in_compressed |
| float | total_out_uncompressed |
| float | total_in_uncompressed |
| char * | net_buffer |
| unsigned int | net_buffer_size |
Definition at line 44 of file m_ziplink.cpp.
|
|
|
Definition at line 78 of file m_ziplink.cpp. References InspIRCd::Modules, net_buffer, Module::ServerInstance, sessions, and ModuleManager::UnpublishInterface(). |
|
|
Definition at line 422 of file m_ziplink.cpp. References izip_session::c_stream, izip_session::d_stream, IZIP_CLOSED, IZIP_OPEN, izip_session::outbuf, and izip_session::status. Referenced by OnRawSocketClose(). |
|
||||||||||||
|
Definition at line 417 of file m_ziplink.cpp. References Module::ServerInstance, InspIRCd::SNO, and SnomaskManager::WriteToSnoMask(). Referenced by OnRawSocketRead(), and OnRawSocketWrite(). |
|
|
Returns the version number of a Module. The method should return a Version object with its version information assigned via Version::Version Reimplemented from Module. Definition at line 85 of file m_ziplink.cpp. References API_VERSION, and VF_VENDOR. |
|
||||||||||||||||
|
Called immediately after any connection is accepted. This is intended for raw socket processing (e.g. modules which wrap the tcp connection within another library) and provides no information relating to a user record as the connection has not been assigned yet. There are no return values from this call as all modules get an opportunity if required to process the connection.
Reimplemented from Module. Definition at line 214 of file m_ziplink.cpp. References OnRawSocketConnect(). |
|
|
Called immediately before any socket is closed. When this event is called, shutdown() has not yet been called on the socket.
Reimplemented from Module. Definition at line 220 of file m_ziplink.cpp. References CloseSession(), and sessions. |
|
|
Called immediately upon connection of an outbound BufferedSocket which has been hooked by a module.
Reimplemented from Module. Definition at line 177 of file m_ziplink.cpp. References izip_session::c_stream, izip_session::d_stream, SocketEngine::GetMaxFds(), IZIP_CLOSED, IZIP_OPEN, izip_session::outbuf, InspIRCd::SE, Module::ServerInstance, sessions, and izip_session::status. Referenced by OnRawSocketAccept(). |
|
||||||||||||||||||||
|
Called immediately before any read() operation on a client socket in the core. This occurs AFTER the select() or poll() so there is always data waiting to be read when this event occurs. Your event should return 1 if it has handled the reading itself, which prevents the core just using read(). You should place any data read into buffer, up to but NOT GREATER THAN the value of count. The value of readresult must be identical to an actual result that might be returned from the read() system call, for example, number of bytes read upon success, 0 upon EOF or closed socket, and -1 for error. If your function returns a nonzero value, you MUST set readresult.
Reimplemented from Module. Definition at line 225 of file m_ziplink.cpp. References izip_session::d_stream, Error(), izip_session::inbuf, IZIP_CLOSED, net_buffer, net_buffer_size, sessions, izip_session::status, total_in_compressed, and total_in_uncompressed. |
|
||||||||||||||||
|
Called immediately before any write() operation on a user's socket in the core. Because this event is a low level event no user information is associated with it. It is intended for use by modules which may wrap connections within another API such as SSL for example. return a non-zero result if you have handled the write operation, in which case the core will not call write().
Reimplemented from Module. Definition at line 326 of file m_ziplink.cpp. References izip_session::c_stream, Error(), IZIP_OPEN, net_buffer, net_buffer_size, izip_session::outbuf, sessions, izip_session::status, total_out_compressed, and total_out_uncompressed. |
|
|
Called whenever a Request class is sent to your module by another module. Please see the documentation of Request::Send() for further information. The Request sent can always be assumed to be non-NULL, you should not change the request object or its data. Your method may return arbitary data in the char* result which the requesting module may be able to use for pre-determined purposes (e.g. the results of an SQL query, etc).
Reimplemented from Module. Definition at line 92 of file m_ziplink.cpp. References EventHandler::AddIOHook(), EventHandler::DelIOHook(), Request::GetId(), and ISHRequest::Sock. |
|
||||||||||||||||
|
Called on all /STATS commands This method is triggered for all /STATS use, including stats symbols handled by the core.
Reimplemented from Module. Definition at line 137 of file m_ziplink.cpp. References InspIRCd::Config, ConvToStr(), MAXBUF, User::nick, Module::ServerInstance, ServerConfig::ServerName, total_in_compressed, total_in_uncompressed, total_out_compressed, and total_out_uncompressed. |
|
|
Definition at line 55 of file m_ziplink.cpp. Referenced by ModuleZLib(), OnRawSocketRead(), OnRawSocketWrite(), and ~ModuleZLib(). |
|
|
Definition at line 56 of file m_ziplink.cpp. Referenced by ModuleZLib(), OnRawSocketRead(), and OnRawSocketWrite(). |
|
|
Definition at line 46 of file m_ziplink.cpp. Referenced by ModuleZLib(), OnRawSocketClose(), OnRawSocketConnect(), OnRawSocketRead(), OnRawSocketWrite(), and ~ModuleZLib(). |
|
|
Definition at line 50 of file m_ziplink.cpp. Referenced by ModuleZLib(), OnRawSocketRead(), and OnStats(). |
|
|
Definition at line 52 of file m_ziplink.cpp. Referenced by ModuleZLib(), OnRawSocketRead(), and OnStats(). |
|
|
Definition at line 49 of file m_ziplink.cpp. Referenced by ModuleZLib(), OnRawSocketWrite(), and OnStats(). |
|
|
Definition at line 51 of file m_ziplink.cpp. Referenced by ModuleZLib(), OnRawSocketWrite(), and OnStats(). |