[BACK]Return to test1-tcp.c CVS log [TXT][DIR] Up to [local] / OpenXM / doc / oxlib

Diff for /OpenXM/doc/oxlib/test1-tcp.c between version 1.1 and 1.2

version 1.1, 2000/09/07 21:34:06 version 1.2, 2000/09/07 21:55:48
Line 1 
Line 1 
 /* $OpenXM$ */  /* $OpenXM: OpenXM/doc/oxlib/test1-tcp.c,v 1.1 2000/09/07 21:34:06 takayama Exp $ */
 /* A sample code to explain how to use ox_asir by TCP/IP and  /* A sample code to explain how to use ox_asir by TCP/IP and
    OpenXM control protocol.     OpenXM control protocol.
    It computes the gcd of 12 and 8 by calling ox_asir server.     It computes the gcd of 12 and 8 by calling ox_asir server.
Line 125  ox_pop_string(int dataPort,char *buf,int limit) {
Line 125  ox_pop_string(int dataPort,char *buf,int limit) {
         exit(1);          exit(1);
   }    }
   length = ox_pop_int32(dataPort);    length = ox_pop_int32(dataPort);
   if (length > limit) {    if (length > limit-1) {
         fprintf(stderr,"Too long string to read.\n");          fprintf(stderr,"Too long string to read.\n");
         exit(1);          exit(1);
   }    }
   read(dataPort,buf,length);    read(dataPort,buf,length);
     buf[length]=0;
 }  }
   
 #define SIZE 1024  #define SIZE 1024

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>