All pastes #16181 Raw Edit

Stuff

public text v1 · immutable
#16181 ·published 2005-06-28 22:17 UTC
rendered paste body
  while (!ifstr.eof())  {
    getline(ifstr, buf);
    buf+="\r\n";


    while(retval != 0) {

      retval = select(sockfd+1, &rfds, NULL, NULL, &tv);
      if (retval != 0){
	cout << "recvar" << endl;
	recvBytes = recv (sockfd, SITE, MAXDATASIZE-1, 0);
	cout << "Recieved: " << SITE << flush;
	cout << strlen(SITE) << endl;
	cout << "recvBytes=" << recvBytes << "\nretval=" << retval << endl;
	SITE[0]='\0';
      }
      else if (retval == -1){
	cout << strerror(errno) << endl;
	close(sockfd);
	exit(EXIT_FAILURE);
      }
      FD_SET(sockfd, &rfds);
      FD_ZERO(&rfds); 
    } //while