It works!!!

This commit is contained in:
Brad Arant committed 2021-08-11 21:38:22 -07:00
1 parent 20d5c99517
commit b7398afc05
16 files changed
+160 -197

No files matched your search

+11 -11
View File
@@ -13,41 +13,41 @@ namespace core {
/// Socket
///
/// The core component to managing a socket.
///
///
/// Hooks into the EPoll through the registration and unregistration process and provides a
/// communication socket of the specified protocol type. This object provides for all receiving
/// data threading through use of the EPoll object and also provides buffering for output data
/// requests to the socket.
/// requests to the socket.
///
/// A program using a socket object can request to open a socket (network or device) and
/// communicate through the streambuffer interface of the socket object.
/// communicate through the streambuffer interface of the socket object.
///
/// The socket side of the Socket accepts EPOLLIN event and will maintain the data in a buffer
/// for the stream readers to read. A onDataReceived event is then sent with the data received in
/// for the stream readers to read. A onDataReceived event is then sent with the data received in
/// the buffer that can be read through the stream. Only sockets that send events to epoll can be
/// used with this object.
///
/// When writing to the stream the data is written into a buffer and a EPOLLOUT is scheduled. Upon
/// receiving the EPOLLOUT event then the buffer is written to the socket output.
/// receiving the EPOLLOUT event then the buffer is written to the socket output.
///
class Socket : public core::Object {
public:
///
/// Constructor
///
/// @param ePoll The EPoll socket descriptor.
/// @param ePoll The EPoll socket descriptor.
/// @param text A title for this socket.
///
Socket(EPoll &ePoll, std::string text = "");
///
/// Destructor
///
~Socket();
///
@@ -151,14 +151,14 @@ namespace core {
///
///
virtual void onDataReceived(coreutils::ZString data);
virtual void onDataReceived(coreutils::ZString &data);
///
/// receiveData will read the data from the socket and place it in the socket buffer.
/// TLS layer overrides this to be able to read from SSL.
///
virtual void receiveData(coreutils::ZString buffer);
virtual void receiveData(coreutils::ZString &buffer);
private: