BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 07-03-2005, 08:44 PM   #1 (permalink)
New Member
 
Join Date: May 2005
Model: 7230
Posts: 1
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default IPPP sockets and http

Please Login to Remove!

Hi, I was wondering if anyone could help me here.
I need to able to open a http connection for reading and writing (the reason being for http tunneling) and be able to read from the socket without the framework attempting to read the whole content before returning from opening the inputstream.
I am pretty sure that I will not be able to do it as I have investigated, but I thought someone may know a way that I am not aware of.
I can see in the http connection that operations such as flush on the outputstream, or openInputStream(), or getResponseCode() etc, end up calling HttpProtocolBase.transitionToState() which in turn calls ClientProtocol.readResponse() which attempts to read the content before returning. I know this makes sense after all http is designed for content delivery type request response.
The application uses a socket usually, but inevitably some clients are only allowed to go out of their network through a http proxy. The problem is to utilize the proxy that the MDS is configured to use i need to use the http connection, I cannot simply mimic the http protocol using a socket.
It seems that IPPP knows whether the TCP connection is intended for use in http connection, from the log file on a MDS simluator for IPPP events I can see that a socket opened on port 80 has the parameters
CONNECTIONHANDLER = , PROTOCOL = TCP
whereas a http connection opened to the same machine on port 80 has
CONNECTIONHANDLER = httpc, PROTOCOL = TCP
I can understand this also as the MDS needs to know whether or not to use the proxy settings, it can't just assume to use them for any socket connection to port 80 (or any socket connection to any port for that matter).

I guess my question is how can I get around this, I can't get to the underlying socket and prevent transitionToState from being called, I don't think I can modify the IPPP connection parameters from the handheld to make to the MDS use the http connection handler (and even then the http connection handler on the MDS may decide to do the same thing ie, read the whole response before sending it to the handset).
I know that I can get around it by changing the framework of the application (use polling or something) but its intended use is for streaming data to the handset (without running software behind the clients firewall, touching the clients MDS or knowing about the clients bes configuration (so can't use http pushes either)).
Thanks for any help or ideas that anyone has.
cheers,
Ricky.
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright 2004-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.