Commit Graph
9 Commits
Author SHA1 Message Date
Brad Arant 701d03dcd9 Fix TLS read/write dispatch on tls branch
TCPSocket inherits from both Socket and TLS, both declaring receiveData()
as unrelated sibling methods - only Socket::receiveData was virtual, so
TLS::receiveData (SSL_read) was never reached regardless of TLS config,
and even when reached its result was never forwarded to onDataReceived
(that call was commented out). Added an explicit TCPSocket::receiveData
override dispatching to TLS::receiveData or Socket::receiveData based on
tlsInfo, and completed TLS::receiveData to actually return/forward the
decrypted bytes.

Write path did not exist at all. Added Socket::sendData() as a new
virtual hook mirroring receiveData, routed Socket::writeSocket() through
it instead of a raw ::write(), added TLS::sendData() (SSL_write, same
error-handling style as the existing TLS methods), and TCPSocket::sendData()
dispatching the same way the read side does.

Also fixed: a queued write in writeSocket() was being popped off the fifo
as if sent even when shutDown was true and nothing was actually written;
removed a dead empty if(tlsInfo){} stub in onDataReceived, no longer
needed now dispatch happens one level up; replaced leftover debug
std::cout lines with proper Log() calls matching the rest of the file.

Verified via full local compile: all 20 .cpp files build clean, link
into libServerCore.a, and nm confirms the new/fixed symbols are correctly
defined in the right object files.
2026-08-22 19:51:08 -07:00
Brad Arant 5feabd0fde TLS almost connects. Needs read and write logic finished. 2025-02-20 15:33:28 -08:00
Brad Arant df0e7cd6da some TLS work. 2025-01-28 16:26:40 -08:00
Brad Arant a391882541 Made server a pointer for eliminating TCPSession2. 2024-07-30 15:59:25 -07:00
Brad Arant b7deabc5dc Rework for TLS. 2024-07-10 13:30:18 -07:00
Brad Arant ec39c1df1a Added subscription service capability. 2021-08-31 17:57:21 -07:00
Brad Arant bcea21cf96 Got it compiling and somewhat working, except post. 2020-11-29 13:57:06 -08:00
barant a5a51f8aae Major changes to socket scheduling in EPoll. 2020-02-29 19:27:58 -08:00
Brad Arant d8b1275884 Initial repository 1.0.0 2019-02-07 13:28:21 -08:00