mirror of
https://github.com/debauchee/barrier.git
synced 2026-02-13 23:25:27 +08:00
Refactored plugin names #4866
This commit is contained in:
@@ -21,14 +21,13 @@
|
||||
#include "net/TCPSocket.h"
|
||||
#include "net/TCPListenSocket.h"
|
||||
#include "arch/Arch.h"
|
||||
#include "common/PluginVersion.h"
|
||||
#include "base/Log.h"
|
||||
|
||||
//
|
||||
// TCPSocketFactory
|
||||
//
|
||||
|
||||
static const char s_networkSecurity[] = { "ns" };
|
||||
|
||||
TCPSocketFactory::TCPSocketFactory(IEventQueue* events, SocketMultiplexer* socketMultiplexer) :
|
||||
m_events(events),
|
||||
m_socketMultiplexer(socketMultiplexer)
|
||||
@@ -51,7 +50,7 @@ TCPSocketFactory::create(bool secure) const
|
||||
m_socketMultiplexer
|
||||
};
|
||||
socket = static_cast<IDataSocket*>(
|
||||
ARCH->plugin().invoke(s_networkSecurity, "getSocket", args));
|
||||
ARCH->plugin().invoke(s_pluginNames[kSecureSocket], "getSocket", args));
|
||||
}
|
||||
else {
|
||||
socket = new TCPSocket(m_events, m_socketMultiplexer);
|
||||
@@ -70,7 +69,7 @@ TCPSocketFactory::createListen(bool secure) const
|
||||
m_socketMultiplexer
|
||||
};
|
||||
socket = static_cast<IListenSocket*>(
|
||||
ARCH->plugin().invoke(s_networkSecurity, "getListenSocket", args));
|
||||
ARCH->plugin().invoke(s_pluginNames[kSecureSocket], "getListenSocket", args));
|
||||
}
|
||||
else {
|
||||
socket = new TCPListenSocket(m_events, m_socketMultiplexer);
|
||||
|
||||
Reference in New Issue
Block a user