Working on block receive capability.
This commit is contained in:
1 parent
58dfd063f3
commit
177bc602af
2 files changed
+15
-7
No files matched your search
+2
-2
@@ -39,7 +39,7 @@ namespace core {
|
||||
while(lineBufferSize > 0) {
|
||||
switch(mode) {
|
||||
case LINE:
|
||||
int lineLength = strcspn(lineBuffer, "\r\n");
|
||||
lineLength = strcspn(lineBuffer, "\r\n");
|
||||
if(lineLength == lineBufferSize)
|
||||
break;
|
||||
onLineReceived(std::string(lineBuffer, lineLength));
|
||||
@@ -66,7 +66,7 @@ namespace core {
|
||||
}
|
||||
}
|
||||
|
||||
void setMode(Mode mode, int blockSize = 0) {
|
||||
void TCPSession::setMode(core::Mode mode, int blockSize) {
|
||||
this->mode = mode;
|
||||
this->blockSize = blockSize;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user