Got it compiling and somewhat working, except post.

This commit is contained in:
Brad Arant committed 2020-11-29 13:57:06 -08:00
1 parent 7ee13e87d2
commit bcea21cf96
12 files changed
+373 -133

No files matched your search

+5 -8
View File
@@ -7,7 +7,6 @@
namespace core {
class Command;
enum Mode {LINE, BLOCK, PACKET};
class TCPServer;
///
@@ -137,13 +136,12 @@ namespace core {
virtual void protocol(std::string data);
///
/// Use the setMode method to set the receiving mode for the data on this socket.
/// Data can be received in LINE mode, which will receive data from the socket one
/// line at a time, or BLOCK mode where a certain specified data block is received
/// before calling the onBlockReceived method.
/// Use setBlockSize to set the amount of data that should be read at once from the
/// session data buffer.
/// If this value is set to 0 then the data will be retrieved
///
void setMode(core::Mode mode, int size = 0);
void setBlockSize(int size = 0);
private:
char *lineBuffer = NULL;
@@ -152,8 +150,7 @@ namespace core {
int blockLength = 0;
std::mutex mtx;
bool term = false;
core::Mode mode = LINE;
int blockSize;
int blockSize = 0;
};