473,320 Members | 1,988 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Httpconnection questions

[BTW, is there really no J2ME group?]

I have questions regarding a J2ME/MIDP HTTPConnection and HTTP 1.0 vs. 1.1 -
although the question is probably not J2ME-specific.
I have a working moble client/server application, and as setting up and
tearing down a socket over the mobile network is something I can see I'd
like to keep to a minimum, I'd like to know how to best take advantage of
HTTP 1.1. (Currently my back end is MS IIS.)

I have noticed the following behavior:
- The HTTP request seems to be sent when I try and open the inputStream on
the HTTP connection.
What returns at this point is a 1.1 200 OK, although the HTTP monitor
shows that no body/content has been reterieved yet.
- When I try and read from the input stream, the monitor shows content. So
it looks like the socket stays open and the read happens on-demand.
- After I process my request, I close the input stream and http connection
and start over.

Questions:
(a) Can I keep my http connection open so the same socket is used for
subsequent requests? (If it happens to be able to stay open, of course.) Or
will HTTPConnection re-use a socket underneath the hood even when the
HTTPConnection object is closed?
(b) Although reading on-demand has advantages, I know I always want my
content (no need to check dates, etc.) so I'd like the body to be
transferred with the HTTP header -- reducing the # of packets and latency
seems especially beneficial on the phone. So perhaps I should be using 1.0?

If the answer to question (a) is true, can I still use 1.1 but tell it to
send the content ASAP with the header and still get socket re-use?

thanks,
mike
Jul 18 '05 #1
0 3863

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: scummer | last post by:
Hi, I am having a problem with the httplib HTTPConnection object. While I can easily send requests that don't have any payload (ie. "get"), I encounter issues if I want to post xml data. If you...
4
by: JuHui | last post by:
how to use httplib.HTTPConnection with http proxy?
0
by: softwareengineer2006 | last post by:
All Interview Questions And Answers 10000 Interview Questions And Answers(C,C++,JAVA,DOTNET,Oracle,SAP) I have listed over 10000 interview questions asked in interview/placement test papers for...
0
by: connectrajesh | last post by:
INTERVIEWINFO.NET http://www.interviewinfo.net FREE WEB SITE AND SERVICE FOR JOB SEEKERS /FRESH GRADUATES NO ADVERTISEMENT
2
by: freepdfforjobs | last post by:
Full eBook with 4000 C#, JAVA,.NET and SQL Server Interview questions http://www.questpond.com/SampleInterviewQuestionBook.zip Download the JAVA , .NET and SQL Server interview sheet and rate...
4
by: Drew | last post by:
I posted this to the asp.db group, but it doesn't look like there is much activity on there, also I noticed that there are a bunch of posts on here pertaining to database and asp. Sorry for...
1
by: Harel | last post by:
I'm using httplib.HTTPConnection to perform http connections and during the beta period of the application I wanted to log its verbose output . However, raising the debuglevel just outputs it to...
0
by: Marco Bizzarri | last post by:
On Mon, Sep 1, 2008 at 1:06 PM, jorma kala <jjkk73@gmail.comwrote: Looking at the code of HTTPConnection, all that goes through the _output message (including, therefore, the putheaders) are...
1
TheMan1
by: TheMan1 | last post by:
How can it be done? Whenever I do it, it downloads a file that is the right size, but seems to be corrupt (ie. can't open it). HttpConnection conn = (HttpConnection)Connector.open(url);...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.