help

For questions and postings not covered by the other forums
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

help

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:57 pm

by sam >> Wed, 8 Mar 2006 23:01:45 GMT

help

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: help

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:57 pm

by sam >> Wed, 8 Mar 2006 23:13:14 GMT

I am a rookie in Jade , and I doing Tcp POST using Jade. What I currently met is that is the response time. I must wait 20-30 seconds to get response. I had wrote a Java program to test , it just cost 1 second less.

So it is not the network problem. I attach my program . Any help will be appreciated
Attachments
4413.txt
(3.24 KiB) Downloaded 82 times
Last edited by ConvertFromOldNGs on Fri Aug 07, 2009 4:15 pm, edited 1 time in total.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: help

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:57 pm

by Torrie >> Thu, 9 Mar 2006 0:01:50 GMT

I'm guessing your problem is due to the line

response := oTCPConnection.readBinary(2000).String;write response;

Jade expects to receive 2000 bytes of data and will wait until the timeout expires before continuing. You could try reducing the timeout value but this may cause problems on the slow links. I'm not familar with the response to a POST but does it have a header that includes the amount of data returned? If so then I would suggest the following (assume the first 4 bytes of the response is the length)

iDataLength := oTCPConnection.readBinary(4).String.Integer;
respone := oTCPConnection.readBinary(iDataLength).String;

This way you are not waiting for more data than you expect to receive.


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 40 guests