TLS almost connects. Needs read and write logic finished.

This commit is contained in:
Brad Arant committed 2025-02-20 15:33:28 -08:00
1 parent e0c0e2c07e
commit 5feabd0fde
10 files changed
+45 -27

No files matched your search

+6 -1
View File
@@ -10,7 +10,7 @@ namespace core {
TCPSocket::TCPSocket(EPoll &ePoll, std::string text) : Socket(ePoll, text) {}
TCPSocket::TCPSocket(EPoll &ePoll, TLSInfo *tlsInfo, std::string text) : Socket(ePoll, text), TLS(tlsInfo) {}
TCPSocket::TCPSocket(EPoll &ePoll, TLSInfo *tlsInfo, std::string text) : Socket(ePoll, text), TLS(tlsInfo), tlsInfo(tlsInfo) {}
TCPSocket::TCPSocket(EPoll &ePoll, SSL_CTX *ctx, std::string text) : Socket(ePoll, text), TLS(ctx) {}
@@ -28,6 +28,11 @@ namespace core {
}
void TCPSocket::onDataReceived(coreutils::ZString &data) {
if(tlsInfo) {
}
if (data.getLength() > 0) {
lineBuffer = (char *)realloc(lineBuffer, lineBufferSize + data.getLength());
memcpy(lineBuffer + lineBufferSize, data.getData(), data.getLength());