removed all prints in generic

This commit is contained in:
Dhanya Maliakal 2016-11-01 16:36:32 +01:00
parent e0aee67dcd
commit b9ac75330c

View File

@ -404,12 +404,10 @@ enum communicationProtocol{
cerr << "Can not create socket "<<endl;
file_des = socketDescriptor;
} else {
cprintf(BLUE,"going to connect\n");
if(connect(socketDescriptor,(struct sockaddr *) &serverAddress,sizeof(serverAddress))<0){
cerr << "Can not connect to socket "<<endl;
file_des = -1;
} else{
cprintf(GREEN,"connected\n");
file_des = socketDescriptor;
}
}
@ -595,9 +593,7 @@ enum communicationProtocol{
if (file_des<0) return -1;
while(length>0){
nsending = (length>packet_size) ? packet_size:length;
cout<<"going to read from " << serverAddress.sin_port << endl;
nsent = read(file_des,(char*)buf+total_sent,nsending);
cout <<"read**" <<endl;
if(!nsent) break;
length-=nsent;
total_sent+=nsent;
@ -671,9 +667,7 @@ enum communicationProtocol{
if (file_des<0) return -1;
while(length>0){
nsending = (length>packet_size) ? packet_size:length;
cout<<"going to send to " << serverAddress.sin_port << endl;
nsent = write(file_des,(char*)buf+total_sent,nsending);
cout<<"sent**" <<endl;
if(!nsent) break;
length-=nsent;
total_sent+=nsent;