Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@apache.org Received: (qmail 43730 invoked from network); 24 Jun 2002 09:09:21 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 24 Jun 2002 09:09:21 -0000 Received: (qmail 17230 invoked by uid 97); 24 Jun 2002 09:09:34 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-dev@jakarta.apache.org Received: (qmail 17177 invoked by uid 97); 24 Jun 2002 09:09:33 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 17147 invoked by uid 98); 24 Jun 2002 09:09:33 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_channel_socket.c X-MimeOLE: Produced By Microsoft Exchange V6.0.5762.3 Date: Mon, 24 Jun 2002 11:09:39 +0200 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_channel_socket.c Thread-Index: AcIbWX1pndUsGJ06QN66xyoGn277twABVMCw From: "GOMEZ Henri" To: "Tomcat Developers List" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N That's what Mladen commited ;) - Henri Gomez ___[_]____ EMAIL : hgomez@slib.fr (. .) =20 PGP KEY : 697ECEDD ...oOOo..(_)..oOOo... PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6=20 >-----Original Message----- >From: andre.powroznik@belgacom.be [mailto:andre.powroznik@belgacom.be] >Sent: Monday, June 24, 2002 10:30 AM >To: tomcat-dev@jakarta.apache.org >Subject: RE: cvs commit: jakarta-tomcat-connectors/jk/native2/common >jk_channel_socket.c > > >You may use #idef WIN32 in order to choose one or the other solution. > >-----Original Message----- >From: GOMEZ Henri [mailto:hgomez@slib.fr] >Sent: 24 June 2002 10:18 >To: Tomcat Developers List >Subject: RE: cvs commit: jakarta-tomcat-connectors/jk/native2/common >jk_channel_socket.c > > >I allways use read/write on Unix instead of recv/send. >It works way better. > >- >Henri Gomez ___[_]____ >EMAIL : hgomez@slib.fr (. .) =20 >PGP KEY : 697ECEDD ...oOOo..(_)..oOOo... >PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6=20 > > > >>-----Original Message----- >>From: mturk@apache.org [mailto:mturk@apache.org] >>Sent: Sunday, June 23, 2002 8:56 AM >>To: jakarta-tomcat-connectors-cvs@apache.org >>Subject: cvs commit: jakarta-tomcat-connectors/jk/native2/common >>jk_channel_socket.c >> >> >>mturk 2002/06/22 23:55:56 >> >> Modified: jk/native2/common jk_channel_socket.c >> Log: >> Costin changed it to use read/write instead of send/receive. >> Unfortunaly that doesn't work on WIN32 cause read/write=20 >>cannot operate on sockets. >> Perhaps we shoud reverse that unless there is a strong=20 >>reason to use the >> read/write on unix. >> =20 >> Revision Changes Path >> 1.35 +20 -2 =20 >>jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c >> =20 >> Index: jk_channel_socket.c >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> RCS file:=20 >>/home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_channe >>l_socket.c,v >> retrieving revision 1.34 >> retrieving revision 1.35 >> diff -u -r1.34 -r1.35 >> --- jk_channel_socket.c 20 Jun 2002 18:45:01 -0000 1.34 >> +++ jk_channel_socket.c 23 Jun 2002 06:55:55 -0000 1.35 >> @@ -355,9 +355,13 @@ >> len=3Dmsg->len; >> b=3Dmsg->buf; >> =20 >> - =20 >> + >> while(sent < len) { >> +#ifdef WIN32 >> + int this_time =3D send(sd, (char *)b + sent , len - sent, = 0); >> +#else >> int this_time =3D write(sd, (char *)b + sent , len - sent); >> +#endif >> if(0 =3D=3D this_time) { >> return -2; >> } >> @@ -393,9 +397,16 @@ >> if( sd<0 ) return JK_ERR; >> =20 >> while(rdlen < len) { >> +#ifdef WIN32 >> + /* WIN32 read cannot operate on sockets */ >> + int this_time =3D recv(sd,=20 >> + (char *)b + rdlen,=20 >> + len - rdlen, 0);=09 >> +#else >> int this_time =3D read(sd,=20 >> (char *)b + rdlen,=20 >> len - rdlen);=09 >> +#endif >> if(-1 =3D=3D this_time) { >> #ifdef WIN32 >> if(SOCKET_ERROR =3D=3D this_time) {=20 >> @@ -430,9 +441,16 @@ >> if( sd<0 ) return JK_ERR; >> =20 >> while(rdlen < minLen ) { >> +#ifdef WIN32 >> + /* WIN32 read cannot operate on sockets */ >> + int this_time =3D recv(sd,=20 >> + (char *)b + rdlen,=20 >> + maxLen - rdlen, 0);=09 >> +#else >> int this_time =3D read(sd,=20 >> (char *)b + rdlen,=20 >> - maxLen - rdlen); >> + maxLen - rdlen);=09 >> +#endif >> /* fprintf(stderr, "XXX received %d\n", this_time ); */ >> if(-1 =3D=3D this_time) { >> #ifdef WIN32 >> =20 >> =20 >> =20 >> >>-- >>To unsubscribe, e-mail: =20 > >For additional commands, e-mail:=20 -- To unsubscribe, e-mail: = For additional commands, e-mail: = **** DISCLAIMER ****=20 "This e-mail and any attachments thereto may contain information=20 which is confidential and/or protected by intellectual property=20 rights and are intended for the sole use of the recipient(s) named = above.=20 Any use of the information contained herein (including, but not limited = to,=20 total or partial reproduction, communication or distribution in any = form)=20 by persons other than the designated recipient(s) is prohibited.=20 If you have received this e-mail in error, please notify the sender = either=20 by telephone or by e-mail and delete the material from any computer.=20 Thank you for your cooperation." -- To unsubscribe, e-mail: = For additional commands, e-mail: = -- To unsubscribe, e-mail: For additional commands, e-mail: