diff --git a/slsReceiverSoftware/include/genericSocket.h b/slsReceiverSoftware/include/genericSocket.h index a10e07649..63de4b5de 100644 --- a/slsReceiverSoftware/include/genericSocket.h +++ b/slsReceiverSoftware/include/genericSocket.h @@ -92,6 +92,13 @@ enum communicationProtocol{ UDP /**< UDP */ }; +typedef struct +{ + unsigned char header_before[20]; + unsigned char fnum[4]; + unsigned char header_after[24]; +} eiger_image_header; + genericSocket(const char* const host_ip_or_name, unsigned short int const port_number, communicationProtocol p, int ps = DEFAULT_PACKET_SIZE) : // portno(port_number), protocol(p), @@ -578,8 +585,33 @@ enum communicationProtocol{ //if length given, listens to length, else listens for packetsize till length is reached if(length){ + +/*int k =0;*/ while(length>0){ nsending = (length>packet_size) ? packet_size:length; + +/* + //created for debugging on 11.05.2015 + nsending=5000; + + nsent = recvfrom(socketDescriptor,(char*)buf,nsending, 0, (struct sockaddr *) &clientAddress, &clientAddress_length); + + if(nsent <1000){ + if(nsent < 48){ + cout << " "<fnum)<< "\t"; + + cout << k <<" packets" << endl; + k = 0; + } + } + else + k++; +*/ + + nsent = recvfrom(socketDescriptor,(char*)buf+total_sent,nsending, 0, (struct sockaddr *) &clientAddress, &clientAddress_length); if(!nsent) break; length-=nsent; diff --git a/slsReceiverSoftware/src/UDPStandardImplementation.cpp b/slsReceiverSoftware/src/UDPStandardImplementation.cpp index 93ad2c8d1..1b9a97c7f 100644 --- a/slsReceiverSoftware/src/UDPStandardImplementation.cpp +++ b/slsReceiverSoftware/src/UDPStandardImplementation.cpp @@ -1950,9 +1950,8 @@ int UDPStandardImplementation::startWriting(){ currframenum = tempframenum; pthread_mutex_unlock(&progress_mutex); } -#ifdef VERYDEBUG - if(myDetectorType == EIGER) - cout << endl <