hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roland Weber <ROLWE...@de.ibm.com>
Subject Re: HttpClient over non-TCP/IP connection?
Date Thu, 24 Feb 2005 07:07:04 GMT
Hi Calum,

"Calum MacLean" <cnmaclean@hotmail.com> wrote on 23.02.2005 12:24:58:

> Does HttpClient only work with TCP/IP?  Or is it possible to use other 
> connections, defining their input/output streams etc.?
> From a look at the source code, it seems to be based on java.net.Socket.

HttpClient is based on java.net.Socket, but sockets are more than TCP/IP.
You can install an 
org.apache.commons.httpclient.protocol.ProtocolSocketFactory
and return your own version of a socket, which might as well use USB to
communicate with the other side.
Granted, the Java version of sockets is tied closely to TCP/IP since that
is the most common use case, but it shouldn't be too much of a problem
to implement dummies for the methods that are not applicable.

cheers,
  Roland


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message