Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   IllegalArgumentException with Socket API and Proxy with Proxy.Type.HTTP (http://www.velocityreviews.com/forums/t948561-illegalargumentexception-with-socket-api-and-proxy-with-proxy-type-http.html)

Greg 07-26-2012 05:00 PM

IllegalArgumentException with Socket API and Proxy with Proxy.Type.HTTP
 
I am trying to create a socket with the proxy type of HTTP. Every time thesocket is created an IllegalArgumentException is thrown. I have learned from googling that the HTTP proxy is unsupported in sockets. What is the work around? Does anyone know? Any help would be much appreciated as there doesn't seem to be an answer readily available that I can find.

Greg

Knute Johnson 07-29-2012 03:36 PM

Re: IllegalArgumentException with Socket API and Proxy with Proxy.Type.HTTP
 
On 7/26/2012 10:00 AM, Greg wrote:
> I am trying to create a socket with the proxy type of HTTP. Every
> time the socket is created an IllegalArgumentException is thrown. I
> have learned from googling that the HTTP proxy is unsupported in
> sockets. What is the work around? Does anyone know? Any help would
> be much appreciated as there doesn't seem to be an answer readily
> available that I can find.
>
> Greg
>


You can set up proxies in the Java Control Panel.

Steven Simpson 07-30-2012 12:26 PM

Re: IllegalArgumentException with Socket API and Proxy with Proxy.Type.HTTP
 
On 26/07/12 18:00, Greg wrote:
> I am trying to create a socket with the proxy type of HTTP. Every time the socket is created an IllegalArgumentException is thrown. I have learned from googling that the HTTP proxy is unsupported in sockets. What is the work around?


How much does the code using the Socket depend on its 'interface'?
Perhaps it would be happy with (say) just getInputStream() and
getOutputStream() on an already connected Socket. If so, then perhaps
you can connect to the proxy explicitly, send "CONNECT" yourself, and
parse the response header. If all goes okay, hand the socket as is over
to the 'using' code, and it won't know the difference.

--
ss at comp dot lancs dot ac dot uk


Greg 08-09-2012 08:40 PM

Re: IllegalArgumentException with Socket API and Proxy with Proxy.Type.HTTP
 
On Thursday, July 26, 2012 10:00:23 AM UTC-7, Greg wrote:
> I am trying to create a socket with the proxy type of HTTP. Every time the socket is created an IllegalArgumentException is thrown. I have learnedfrom googling that the HTTP proxy is unsupported in sockets. What is the work around? Does anyone know? Any help would be much appreciated as there doesn't seem to be an answer readily available that I can find.
>
>
>
> Greg


The code pretty extensively relies on the sockets interface.

Steven Simpson 08-16-2012 08:26 PM

Re: IllegalArgumentException with Socket API and Proxy with Proxy.Type.HTTP
 
On 09/08/12 21:40, Greg wrote:
> On Thursday, July 26, 2012 10:00:23 AM UTC-7, Greg wrote:
>> I am trying to create a socket with the proxy type of HTTP. Every time the socket is created an IllegalArgumentException is thrown. I have learned from googling that the HTTP proxy is unsupported in sockets.

> The code pretty extensively relies on the sockets interface.


Can you define 'pretty extensively', i.e. enumerate the methods which
are used, and in what sequences? If this is sufficiently simple, and
you can modify the code, some refactoring to use your own abstraction of
the socket ought to be possible.

--
ss at comp dot lancs dot ac dot uk



All times are GMT. The time now is 02:12 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57