Added block write to socket tools

This commit is contained in:
Magne Sjaastad
2014-04-01 15:31:13 +02:00
parent 3ec22a9221
commit 039ba48bed
7 changed files with 67 additions and 9 deletions

View File

@@ -16,9 +16,12 @@
/////////////////////////////////////////////////////////////////////////////////
#include "RiaStdInclude.h"
#include "RiaSocketCommand.h"
#include "RiaSocketServer.h"
#include "RiaSocketTools.h"
#include "RiaApplication.h"
#include "RiaPreferences.h"
#include "RimReservoirView.h"
#include "RimResultSlot.h"
@@ -28,8 +31,8 @@
#include "RimWellCollection.h"
#include "Rim3dOverlayInfoConfig.h"
#include "RimReservoirCellResultsCacher.h"
#include "RimCase.h"
#include "RigCaseData.h"
#include "RigCaseCellResultsData.h"
@@ -37,6 +40,7 @@
//--------------------------------------------------------------------------------------------------
/// OBSOLETE, to be deleted
//--------------------------------------------------------------------------------------------------
@@ -133,7 +137,8 @@ public:
for (size_t tIdx = 0; tIdx < columnCount; ++tIdx)
{
#if 1 // Write data as raw bytes, fast but does not handle byteswapping
server->currentClient()->write((const char *)activeCellInfo[tIdx].data(), timestepByteCount);
RiaSocketTools::writeBlockData(server, server->currentClient(), (const char *)activeCellInfo[tIdx].data(), timestepByteCount);
#else // Write data using QDataStream, does byteswapping for us. Must use QDataStream on client as well
for (size_t cIdx = 0; cIdx < activeCellInfo[tIdx].size(); ++cIdx)
{