mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-24 07:20:01 +02:00
Solved merge conflicts
This commit is contained in:
parent
fdaca88225
commit
28ed7d6b2d
@ -99,13 +99,6 @@ typedef struct
|
|||||||
unsigned char header_after[24];
|
unsigned char header_after[24];
|
||||||
} eiger_image_header;
|
} eiger_image_header;
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
unsigned char header_before[19];
|
|
||||||
unsigned char fnum[4];
|
|
||||||
unsigned char header_after[25];
|
|
||||||
} eiger_image_header32;
|
|
||||||
|
|
||||||
genericSocket(const char* const host_ip_or_name, unsigned short int const port_number, communicationProtocol p, int ps = DEFAULT_PACKET_SIZE) :
|
genericSocket(const char* const host_ip_or_name, unsigned short int const port_number, communicationProtocol p, int ps = DEFAULT_PACKET_SIZE) :
|
||||||
// portno(port_number),
|
// portno(port_number),
|
||||||
protocol(p),
|
protocol(p),
|
||||||
@ -592,38 +585,16 @@ typedef struct
|
|||||||
|
|
||||||
//if length given, listens to length, else listens for packetsize till length is reached
|
//if length given, listens to length, else listens for packetsize till length is reached
|
||||||
if(length){
|
if(length){
|
||||||
/*int k = 0;*/
|
|
||||||
|
|
||||||
while(length>0){
|
while(length>0){
|
||||||
nsending = (length>packet_size) ? packet_size:length;
|
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 << " "<<dec<<nsent<<" ";
|
|
||||||
}else{
|
|
||||||
cout << "nsent: " << dec<<nsent << "\tfnum:" <<
|
|
||||||
htonl(*(unsigned int*)((eiger_image_header32 *)((char*)(buf)))->fnum)<< "\t";
|
|
||||||
cout << k <<" packets" << endl;
|
|
||||||
k = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
k++;
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
nsent = recvfrom(socketDescriptor,(char*)buf+total_sent,nsending, 0, (struct sockaddr *) &clientAddress, &clientAddress_length);
|
nsent = recvfrom(socketDescriptor,(char*)buf+total_sent,nsending, 0, (struct sockaddr *) &clientAddress, &clientAddress_length);
|
||||||
if(!nsent) break;
|
if(!nsent) break;
|
||||||
if(nsent == 16) {
|
if (nsent == 16) continue;
|
||||||
//cout << ".";
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
length-=nsent;
|
length-=nsent;
|
||||||
total_sent+=nsent;
|
total_sent+=nsent;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user