flattest commit yet

This commit is contained in:
malloc 2018-04-09 08:06:53 -05:00
parent 4b0fbf2793
commit 0662828b42
4 changed files with 20 additions and 4 deletions

2
server/src/sock/pool.cpp Normal file
View file

@ -0,0 +1,2 @@
#include "pool.hpp"

14
server/src/sock/pool.hpp Normal file
View file

@ -0,0 +1,14 @@
#ifndef SOSC_POOL_H
#define SOSC_POOL_H
namespace sosc {
template<typename T>
class Pool {
public:
private:
};
}
#endif

View file

@ -91,13 +91,13 @@ int sosc::ScapeConnection::Receive(Packet* packet, bool block) {
} }
// TODO optimize // TODO optimize
this->multiframe_buffer += frame.GetBody(); // TODO determine if packet->Parse should write back to pck_frames on o/f
this->pck_frames += frame.GetBody();
if(frame.IsFinal()) { if(frame.IsFinal()) {
if(packet->Parse(this->multiframe_buffer) == PCK_OK) if(packet->Parse(this->pck_frames, &this->pck_frames) == PCK_OK)
return PCK_OK; return PCK_OK;
else else
return PCK_ERR; return PCK_ERR;
} else } else
return PCK_MORE; return PCK_MORE;
} }

View file

@ -41,7 +41,7 @@ private:
TcpClient client; TcpClient client;
std::string buffer; std::string buffer;
std::string multiframe_buffer; std::string pck_frames;
friend class ScapeServer; friend class ScapeServer;
}; };