#5617 Remove plugin infra from TCPSocketFactory

This commit is contained in:
Andrew Nelless 2016-09-27 12:29:03 +01:00
parent 5774f5a291
commit dc93b063b7
1 changed files with 3 additions and 13 deletions

View File

@ -17,9 +17,9 @@
*/ */
#include "net/TCPSocketFactory.h" #include "net/TCPSocketFactory.h"
#include "net/TCPSocket.h" #include "net/TCPSocket.h"
#include "net/TCPListenSocket.h" #include "net/TCPListenSocket.h"
#include "net/SecureListenSocket.h"
#include "arch/Arch.h" #include "arch/Arch.h"
#include "common/PluginVersion.h" #include "common/PluginVersion.h"
#include "base/Log.h" #include "base/Log.h"
@ -45,12 +45,7 @@ TCPSocketFactory::create(bool secure) const
{ {
IDataSocket* socket = NULL; IDataSocket* socket = NULL;
if (secure) { if (secure) {
void* args[2] = { socket = new SecureSocket(m_events, m_socketMultiplexer);
m_events,
m_socketMultiplexer
};
socket = static_cast<IDataSocket*>(
ARCH->plugin().invoke(s_pluginNames[kSecureSocket], "getSocket", args));
} }
else { else {
socket = new TCPSocket(m_events, m_socketMultiplexer); socket = new TCPSocket(m_events, m_socketMultiplexer);
@ -64,12 +59,7 @@ TCPSocketFactory::createListen(bool secure) const
{ {
IListenSocket* socket = NULL; IListenSocket* socket = NULL;
if (secure) { if (secure) {
void* args[2] = { socket = new SecureListenSocket(m_events, m_socketMultiplexer);
m_events,
m_socketMultiplexer
};
socket = static_cast<IListenSocket*>(
ARCH->plugin().invoke(s_pluginNames[kSecureSocket], "getListenSocket", args));
} }
else { else {
socket = new TCPListenSocket(m_events, m_socketMultiplexer); socket = new TCPListenSocket(m_events, m_socketMultiplexer);