Aufgrund einer Störung des s3 Storage, könnten in nächster Zeit folgende GitLab Funktionen nicht zur Verfügung stehen: LFS, Container Registry, Job Artifacs, Uploads (Wiki, Bilder, Projekt-Exporte). Wir bitten um Verständnis. Es wird mit Hochdruck an der Behebung des Problems gearbeitet. Weitere Informationen zur Störung des Object Storage finden Sie hier: https://maintenance.itc.rwth-aachen.de/ticket/status/messages/59-object-storage-pilot

Commit 2d31056a authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen
Browse files

Fixing problems with Vista Net Test and big data transmission! Never read data...

Fixing problems with Vista Net Test and big data transmission! Never read data that exceeds the incoming data buffer size ...
parent c14c95eb
......@@ -9,9 +9,10 @@
using namespace std;
static string g_sServerName = "localhost";
static int g_iServerPort = 12480;
static int g_iRepetitions = 10;
static const string g_sServerName = "localhost";
static const int g_iServerPort = 12480;
static const int g_iRepetitions = 5;
static const size_t g_lDataSize = 152733239;
class CServer : public VistaThread
......@@ -57,7 +58,8 @@ public:
int iBytesReceivedTotal = 0;
while( iPayloadDataSize != iBytesReceivedTotal )
{
int iBytesReceived = pSocket->ReceiveRaw( &vdIncomingData[ iBytesReceivedTotal ], iPayloadDataSize );
long nIncomingBytes = pSocket->WaitForIncomingData( 0 );
int iBytesReceived = pSocket->ReceiveRaw( &vdIncomingData[ iBytesReceivedTotal ], nIncomingBytes );
iBytesReceivedTotal += iBytesReceived;
vstr::out() << "[ Server ] " << setw( 3 ) << std::floor( iBytesReceivedTotal / float( iPayloadDataSize ) * 100.0f ) << "% transmitted" << endl;
}
......@@ -101,10 +103,9 @@ int main( int , char** )
while( i++ <= g_iRepetitions )
{
vstr::out() << "[ Client ] Client sending data now." << endl;
size_t l = 1523633239; // > MTU?
vector< char > vdData( l + 4 );
vector< char > vdData( g_lDataSize + 4 );
int* piDataSize = ( int* ) &vdData[ 0 ];
*piDataSize = unsigned int( l ); // Send data size as first block
*piDataSize = unsigned int( g_lDataSize ); // Send data size as first block
vdData[ 1 * sizeof( int ) + 0 ] = 1; // First entry one (just for fun)
vdData[ vdData.size() - 2 ] = -1; // Second last entry -1 (just for fun)
void* pData = ( void* ) &vdData[ 0 ];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment