Commit 269634fc authored by jan.koester's avatar jan.koester
Browse files

test

parent d9d722bb
Loading
Loading
Loading
Loading
+2 −1
Changes for src/event/epoll.cpp: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -184,7 +184,8 @@ namespace netplus {
            }else if(_ServerSocket->_Type==sockettype::UDP){
                ccon->csock=std::make_unique<udp>(-1);
            }else if(_ServerSocket->_Type==sockettype::SSL){
                // clt->connection->csock=std::make_unique<ssl>( -1);
                netplus::ssl *srv = static_cast<netplus::ssl*>(_ServerSocket);
                ccon->csock=std::make_unique<ssl>( srv->_cert,-1);
            }

            if (!ccon->csock) {
+2 −1
Changes for src/event/iocp.cpp: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -114,7 +114,8 @@ namespace netplus {
			if (g_serversocket->_Type == TCP) {
				pClientContext->CurCon->csock = std::make_unique<tcp>();
			}else if (g_serversocket->_Type == SSL) {
				pClientContext->CurCon->csock = std::make_unique<ssl>();
                netplus::ssl *srv = static_cast<netplus::ssl*>(_ServerSocket);
                ccon->csock=std::make_unique<ssl>( srv->_cert,-1);
			}else {
				NetException exp;
				exp[NetException::Error] << "Wrong Protocol only tcp supported at the moment !";
+2 −2
Changes for src/event/kqueue.cpp: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -192,8 +192,8 @@ void ConnectEventHandler(int pos, const int tid, ULONG_PTR args) {
                } else if(_ServerSocket->_Type==sockettype::UDP){
                    ccon->csock=std::make_unique<udp>(-1);
                } else if(_ServerSocket->_Type==sockettype::SSL){
                     // Assuming an SSL type exists and is handled correctly
                     // ccon->csock=std::make_unique<ssl>(-1);
                    netplus::ssl *srv = static_cast<netplus::ssl*>(_ServerSocket);
                    ccon->csock=std::make_unique<ssl>( srv->_cert,-1);
                }

                // If no supported socket type was initialized, skip this iteration/exit function
+2 −1
Changes for src/event/poll.cpp: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -320,7 +320,8 @@ namespace netplus {
            }else if(_ServerSocket->_Type==sockettype::UDP){
                ccon->csock=std::make_unique<udp>(-1);
            }else if(_ServerSocket->_Type==sockettype::SSL){
                // clt->connection->csock=std::make_unique<ssl>( -1);
                netplus::ssl *srv = static_cast<netplus::ssl*>(_ServerSocket);
                ccon->csock=std::make_unique<ssl>( srv->_cert,-1);
            }

            if (!ccon->csock) {
+4 −2
Changes for src/socket.h: 4 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -203,8 +203,9 @@ namespace netplus {

            using tcp::operator=;

            ssl()=default;
            ~ssl()=default;
            ssl(const netplus::x509cert cert) : _cert(cert) , _aes(nullptr) {}
            ssl(const netplus::x509cert cert,int sock) :  tcp (sock), _cert(cert) ,_aes(nullptr)  {};
            ~ssl(){};

            ssl(const std::string &addr,int port,int maxconnections,int sockopts,const netplus::x509cert cert);

@@ -223,5 +224,6 @@ namespace netplus {
            bool _handshakeDone;
            void performServerHandshake();
            void performClientHandshake();
            friend class poll;
        };
};
Loading