Use latest swiften optimizations to increase BoostConnection speed
This commit is contained in:
parent
715efadbdf
commit
052c4ac633
5 changed files with 7 additions and 7 deletions
|
@ -108,7 +108,7 @@ else()
|
|||
endif()
|
||||
|
||||
if(CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
ADD_DEFINITIONS(-O0)
|
||||
ADD_DEFINITIONS(-O3)
|
||||
ADD_DEFINITIONS(-ggdb)
|
||||
ADD_DEFINITIONS(-DDEBUG)
|
||||
ADD_DEFINITIONS(-Wall)
|
||||
|
|
|
@ -234,7 +234,7 @@ class NetworkPlugin {
|
|||
void handleChatStatePayload(const std::string &payload, Swift::ChatState::ChatStateType type);
|
||||
void handleAttentionPayload(const std::string &payload);
|
||||
void handleFTStartPayload(const std::string &payload);
|
||||
void handleDataRead(const Swift::SafeByteArray&);
|
||||
void handleDataRead(boost::shared_ptr<Swift::SafeByteArray> data);
|
||||
void _handleConnected(bool error);
|
||||
void handleDisconnected();
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ class NetworkPluginServer {
|
|||
private:
|
||||
void handleNewClientConnection(boost::shared_ptr<Swift::Connection> c);
|
||||
void handleSessionFinished(Backend *c);
|
||||
void handleDataRead(Backend *c, const Swift::SafeByteArray&);
|
||||
void handleDataRead(Backend *c, boost::shared_ptr<Swift::SafeByteArray> data);
|
||||
|
||||
void handleConnectedPayload(const std::string &payload);
|
||||
void handleDisconnectedPayload(const std::string &payload);
|
||||
|
|
|
@ -454,8 +454,8 @@ void NetworkPlugin::handleChatStatePayload(const std::string &data, Swift::ChatS
|
|||
}
|
||||
}
|
||||
|
||||
void NetworkPlugin::handleDataRead(const Swift::SafeByteArray &data) {
|
||||
m_data.insert(m_data.end(), data.begin(), data.end());
|
||||
void NetworkPlugin::handleDataRead(boost::shared_ptr<Swift::SafeByteArray> data) {
|
||||
m_data.insert(m_data.end(), data->begin(), data->end());
|
||||
|
||||
while (m_data.size() != 0) {
|
||||
unsigned int expected_size;
|
||||
|
|
|
@ -601,9 +601,9 @@ void NetworkPluginServer::handleFTDataPayload(const std::string &data) {
|
|||
LOG4CXX_INFO(logger, "handleFTDataPayload size=" << payload.data().size());
|
||||
}
|
||||
|
||||
void NetworkPluginServer::handleDataRead(Backend *c, const Swift::SafeByteArray &data) {
|
||||
void NetworkPluginServer::handleDataRead(Backend *c, boost::shared_ptr<Swift::SafeByteArray> data) {
|
||||
// Append data to buffer
|
||||
c->data.insert(c->data.end(), data.begin(), data.end());
|
||||
c->data.insert(c->data.end(), data->begin(), data->end());
|
||||
|
||||
// Parse data while there are some
|
||||
while (c->data.size() != 0) {
|
||||
|
|
Loading…
Add table
Reference in a new issue