]> git.netwichtig.de Git - user/henk/code/inspircd.git/commit
Split IOHook into IOHook and IOHookProvider
authorAttila Molnar <attilamolnar@hush.com>
Tue, 24 Sep 2013 18:40:20 +0000 (20:40 +0200)
committerAttila Molnar <attilamolnar@hush.com>
Wed, 22 Jan 2014 18:10:01 +0000 (19:10 +0100)
commit99f79a4e5c3abbe91a03216824e7659051872054
tree629ed4d4cccb115e95f53c582047bc239d213624
parent282138ad0e9ef483ec2a1606376fc5cb6d5f4cbc
Split IOHook into IOHook and IOHookProvider

Create one IOHook instance for each hooked socket which contains all the
hook specific data and read/write/close functions, removing the need for
the "issl_session" array in SSL modules.

Register instances of the IOHookProvider class in the core and use them to
create specialized IOHook instances (OnConnect/OnAccept).

Remove the OnHookIO hook, add a dynamic reference to ListenSocket that
points to the hook provider (if any) to use for incoming connections on
that socket.

For outgoing connections modules still have to find the IOHookProvider
they want to use themselves but instead of calling AddIOHook(hookprov),
now they have to call IOHookProvider::OnConnect() after the connection
has been established.
15 files changed:
include/iohook.h
include/modules.h
include/modules/ssl.h
include/socket.h
src/inspsocket.cpp
src/listensocket.cpp
src/modules.cpp
src/modules/extra/m_ssl_gnutls.cpp
src/modules/extra/m_ssl_openssl.cpp
src/modules/m_httpd.cpp
src/modules/m_spanningtree/main.cpp
src/modules/m_spanningtree/treesocket1.cpp
src/modules/m_starttls.cpp
src/socket.cpp
src/usermanager.cpp