mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-11 04:17:15 +02:00
minor changes
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@41 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
@ -225,12 +225,14 @@ int MySocketTCP::SendDataOnly(void* buf,int length){//length in characters
|
||||
|
||||
cout << "want to send "<< length << " Bytes" << endl;
|
||||
#endif
|
||||
|
||||
int nsending;
|
||||
int nsent;
|
||||
if (file_des<0) return -1;
|
||||
int total_sent=0;
|
||||
|
||||
while(length>0){
|
||||
int nsending = (length>send_rec_max_size) ? send_rec_max_size:length;
|
||||
int nsent = write(file_des,(char*)buf+total_sent,nsending);
|
||||
nsending = (length>send_rec_max_size) ? send_rec_max_size:length;
|
||||
nsent = write(file_des,(char*)buf+total_sent,nsending);
|
||||
if(!nsent) break;
|
||||
length-=nsent;
|
||||
total_sent+=nsent;
|
||||
@ -268,13 +270,14 @@ int MySocketTCP::ReceiveDataOnly(void* buf,int length){//length in characters
|
||||
#ifdef VERY_VERBOSE
|
||||
cout << "want to receive "<< length << " Bytes" << endl;
|
||||
#endif
|
||||
|
||||
int nreceiving;
|
||||
int nreceived;
|
||||
while(length>0){
|
||||
int nreceiving = (length>send_rec_max_size) ? send_rec_max_size:length;
|
||||
nreceiving = (length>send_rec_max_size) ? send_rec_max_size:length;
|
||||
#ifdef VERY_VERBOSE
|
||||
cout << "start to receive "<< nreceiving << " Bytes" << endl;
|
||||
#endif
|
||||
int nreceived = read(file_des,(char*)buf+total_received,nreceiving);
|
||||
nreceived = read(file_des,(char*)buf+total_received,nreceiving);
|
||||
#ifdef VERY_VERBOSE
|
||||
cout << "received "<< nreceived << " Bytes on fd " << file_des << endl;
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user